diff options
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 45d30acaaf..99f01b41f9 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1721,7 +1721,7 @@ static int _spell_weight(spell_type spell) // When randomly picking a book for acquirement, use the sum of the // weights of all unknown spells in the book. -static int _book_weight(int book) +static int _book_weight(book_type book) { ASSERT(book >= 0 && book <= MAX_FIXED_BOOK); @@ -1843,7 +1843,7 @@ static bool _do_book_acquirement(item_def &book, int agent) weights[bk] = 0; continue; } - weights[bk] = _book_weight(bk); + weights[bk] = _book_weight(static_cast<book_type>(bk)); total_weights += weights[bk]; } |