summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-chimera.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-16 10:22:51 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-16 19:36:21 +0100
commit97aa533c25deebe96ca4caf538fbac1a845819c1 (patch)
treed348defc4ac438079f410a05505e65ea136c9cec /crawl-ref/source/mon-chimera.cc
parent996e7c22911f2ed2cf4764b12213207d3c29c354 (diff)
downloadcrawl-ref-97aa533c25deebe96ca4caf538fbac1a845819c1.tar.gz
crawl-ref-97aa533c25deebe96ca4caf538fbac1a845819c1.zip
Refactor pairs of asserts to ASSERT_RANGE.
More readable, and failures give more informative messages.
Diffstat (limited to 'crawl-ref/source/mon-chimera.cc')
-rw-r--r--crawl-ref/source/mon-chimera.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-chimera.cc b/crawl-ref/source/mon-chimera.cc
index b600dff361..b895f259c0 100644
--- a/crawl-ref/source/mon-chimera.cc
+++ b/crawl-ref/source/mon-chimera.cc
@@ -269,10 +269,8 @@ string monster_info::chimera_part_names() const
monster_type chimtype2 = static_cast<monster_type>(props["chimera_part_2"].get_int());
monster_type chimtype3 = static_cast<monster_type>(props["chimera_part_3"].get_int());
- ASSERT(chimtype2 > MONS_PROGRAM_BUG);
- ASSERT(chimtype2 < NUM_MONSTERS);
- ASSERT(chimtype3 > MONS_PROGRAM_BUG);
- ASSERT(chimtype3 < NUM_MONSTERS);
+ ASSERT_RANGE(chimtype2, MONS_PROGRAM_BUG + 1, NUM_MONSTERS);
+ ASSERT_RANGE(chimtype3, MONS_PROGRAM_BUG + 1, NUM_MONSTERS);
ostringstream s;
s << ", " << get_monster_data(chimtype2)->name