From 4412160c9f7d6410f7974e6daf1027716547cceb Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 19:11:08 +0100 Subject: Make some passed references const. A couple of the Feawn functions were passed read-only arguments (coordinate center, etc.) as non-const references, which leaked out to require you.pos() to be non-const. --- crawl-ref/source/effects.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 92fa7690d0..9dbced7c40 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -4305,12 +4305,12 @@ static int _arc_decomposition(const coord_def & pos, int n_arcs) return static_cast (theta / arc_angle); } -int place_ring(std::vector & ring_points, - coord_def & origin, - mgen_data & prototype, - int n_arcs, - int arc_occupancy, - int & seen_count) +int place_ring(std::vector &ring_points, + const coord_def &origin, + mgen_data prototype, + int n_arcs, + int arc_occupancy, + int &seen_count) { std::random_shuffle(ring_points.begin(), ring_points.end()); @@ -4349,7 +4349,7 @@ int place_ring(std::vector & ring_points, // Collect lists of points that are within LOS (under the given env map), // unoccupied, and not solid (walls/statues). void collect_radius_points(std::vector > &radius_points, - coord_def & origin, env_show_grid & losgrid) + const coord_def &origin, const env_show_grid &losgrid) { radius_points.clear(); -- cgit v1.2.3-54-g00ecf