summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pick.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-01-12 14:30:34 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-01-12 15:26:24 +0100
commit048d9668e7f308c7081f8823637e47ed69a5df9c (patch)
tree13e58b5ae9c70a11d6abb611f4e8c4469ec9f8b6 /crawl-ref/source/mon-pick.cc
parent4869dc39e9cdbc1f7ad5953b50e65540525049c6 (diff)
downloadcrawl-ref-048d9668e7f308c7081f8823637e47ed69a5df9c.tar.gz
crawl-ref-048d9668e7f308c7081f8823637e47ed69a5df9c.zip
Constify.
Diffstat (limited to 'crawl-ref/source/mon-pick.cc')
-rw-r--r--crawl-ref/source/mon-pick.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc
index 19963e07da..db13b2f0a2 100644
--- a/crawl-ref/source/mon-pick.cc
+++ b/crawl-ref/source/mon-pick.cc
@@ -37,7 +37,7 @@ typedef struct
int mons_depth(monster_type mcls, branch_type branch)
{
// legacy function, until ZotDef is ported
- for (pop_entry *pe = population[branch].pop; pe->mons; pe++)
+ for (const pop_entry *pe = population[branch].pop; pe->mons; pe++)
if (pe->mons == mcls)
return (pe->minr + pe->maxr) / 2;
@@ -48,7 +48,7 @@ int mons_depth(monster_type mcls, branch_type branch)
// A return value of zero means the monster will never appear. {dlb}
int mons_rarity(monster_type mcls, branch_type branch)
{
- for (pop_entry *pe = population[branch].pop; pe->mons; pe++)
+ for (const pop_entry *pe = population[branch].pop; pe->mons; pe++)
if (pe->mons == mcls)
{
// A rough and wrong conversion of new-style linear rarities to