summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-12-16 05:12:47 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-12-16 05:12:47 +0100
commitd33793693eaf8ce4007158ba43a7a56db75f5a13 (patch)
tree814b5c62a24b39138ed4dd662a1a023534c802dc /crawl-ref/source
parent129b971fb6ed8d2eec2abc1c9c69fd1e67cfc9cd (diff)
downloadcrawl-ref-d33793693eaf8ce4007158ba43a7a56db75f5a13.tar.gz
crawl-ref-d33793693eaf8ce4007158ba43a7a56db75f5a13.zip
Constify the actor in mgen_data.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/mgen_data.h4
-rw-r--r--crawl-ref/source/mon-place.cc8
-rw-r--r--crawl-ref/source/store.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/mgen_data.h b/crawl-ref/source/mgen_data.h
index 99e311b623..88c8f1042c 100644
--- a/crawl-ref/source/mgen_data.h
+++ b/crawl-ref/source/mgen_data.h
@@ -27,7 +27,7 @@ struct mgen_data
// Who summoned this monster? Important to know for death accounting
// and the summon cap, if and when it goes in. NULL is no summoner.
- actor* summoner;
+ const actor* summoner;
// For summoned monsters, this is a measure of how long the summon will
// hang around, on a scale of 1-6, 6 being longest. Use 0 for monsters
@@ -118,7 +118,7 @@ struct mgen_data
mgen_data(monster_type mt = RANDOM_MONSTER,
beh_type beh = BEH_HOSTILE,
- actor* sner = 0,
+ const actor* sner = 0,
int abj = 0,
int st = 0,
const coord_def &p = coord_def(-1, -1),
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 614a08ffea..57297d6bfc 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -1731,16 +1731,16 @@ static monster* _place_monster_aux(const mgen_data &mg, const monster *leader,
mons_add_blame(mon, blame_prefix + "the player character");
else
{
- monster* sum = mg.summoner->as_monster();
+ const monster* sum = mg.summoner->as_monster();
mons_add_blame(mon, (blame_prefix
+ sum->full_name(DESC_A, true)));
if (sum->props.exists("blame"))
{
- CrawlVector& oldblame = sum->props["blame"].get_vector();
- for (CrawlVector::iterator i = oldblame.begin();
+ const CrawlVector& oldblame = sum->props["blame"].get_vector();
+ for (CrawlVector::const_iterator i = oldblame.begin();
i != oldblame.end(); ++i)
{
- mons_add_blame(mon, *i);
+ mons_add_blame(mon, i->get_string());
}
}
}
diff --git a/crawl-ref/source/store.h b/crawl-ref/source/store.h
index 122e66d164..9f63d58428 100644
--- a/crawl-ref/source/store.h
+++ b/crawl-ref/source/store.h
@@ -155,7 +155,7 @@ public:
const CrawlHashTable& get_table() const;
const CrawlVector& get_vector() const;
const item_def& get_item() const;
- const monster& get_monster() const;
+ const monster& get_monster() const;
const dlua_chunk& get_lua() const;
public: