summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-01 22:26:15 -0400
committerNeil Moore <neil@s-z.org>2014-07-01 22:55:21 -0400
commitffd9f27e324a753ed1090701bdbbf7f0e6d4cd03 (patch)
tree6f21d9998a323ae7f64f8d5743384a872747de89 /crawl-ref/source/mon-util.cc
parent6f411d1547278c84dff7c0003e4ffe350d566e50 (diff)
downloadcrawl-ref-ffd9f27e324a753ed1090701bdbbf7f0e6d4cd03.tar.gz
crawl-ref-ffd9f27e324a753ed1090701bdbbf7f0e6d4cd03.zip
Simplify, optimise, and improve formatting
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index b102e0473b..c47f3f024f 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -2313,7 +2313,7 @@ unique_books get_unique_spells(const monster_info &mi)
unique_books result;
for (size_t i = 0; i < num_books; ++i)
{
- mon_spellbook_type book = books[i];
+ const mon_spellbook_type book = books[i];
vector<spell_type> spells;
for (int j = 0; j < NUM_MONSTER_SPELL_SLOTS; ++j)
@@ -2343,7 +2343,7 @@ unique_books get_unique_spells(const monster_info &mi)
static void _mons_load_spells(monster* mon)
{
vector<mon_spellbook_type> books = _mons_spellbook_list(mon->type);
- mon_spellbook_type book = books[random2(books.size())];
+ const mon_spellbook_type book = books[random2(books.size())];
if (book == MST_GHOST)
return mon->load_ghost_spells();