summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 19:11:08 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-06 19:16:19 +0100
commit4412160c9f7d6410f7974e6daf1027716547cceb (patch)
treec48612e4bb41b55a8efd36273e5e98cd9f4a4404 /crawl-ref/source/spells2.cc
parentdef6a88b388cdcf3ac08c2144b9d30f6c8bfb010 (diff)
downloadcrawl-ref-4412160c9f7d6410f7974e6daf1027716547cceb.tar.gz
crawl-ref-4412160c9f7d6410f7974e6daf1027716547cceb.zip
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.
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index b0f2f38563..e91d251949 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -2106,7 +2106,7 @@ void point_point(std::vector<coord_def> & origins,
// to calculate the distances in question. In practice it should be called for
// at most 7 searches since 8 (all adjacent free, > 8 monsters in view) can be
// special cased easily.
-bool prioritise_adjacent(coord_def & target, std::vector<coord_def> & candidates)
+bool prioritise_adjacent(const coord_def &target, std::vector<coord_def> & candidates)
{
radius_iterator los_it(target, LOS_RADIUS, true, true, true);
@@ -2114,7 +2114,7 @@ bool prioritise_adjacent(coord_def & target, std::vector<coord_def> & candidates
// collect hostile monster positions in LOS
for ( ; los_it; ++los_it)
{
- monsters * hostile = monster_at(*los_it);
+ monsters *hostile = monster_at(*los_it);
if (hostile && hostile->attitude == ATT_HOSTILE)
mons_positions.push_back(hostile->pos());