summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills2.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-06-08 20:29:11 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-06-08 20:29:11 +0200
commitae1dc47dc5b5f48957eb44396ab153acc38ef712 (patch)
treedb3ffa00832ac001005b52002abc1650cd7f426b /crawl-ref/source/skills2.cc
parent258af752a1d6f6dc337c97e8ceabf26bcb974f31 (diff)
downloadcrawl-ref-ae1dc47dc5b5f48957eb44396ab153acc38ef712.tar.gz
crawl-ref-ae1dc47dc5b5f48957eb44396ab153acc38ef712.zip
ASSERT_RANGEs other than >= <.
Committing separately as I'm not sure whether checking, for example, ASSERT_RANGE(level, 1, 28) is that nice. Perhaps 27 + 1 could be better? Perhaps some other syntax?
Diffstat (limited to 'crawl-ref/source/skills2.cc')
-rw-r--r--crawl-ref/source/skills2.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index a5ab25441b..b5d0a8f30f 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -549,8 +549,7 @@ unsigned int skill_exp_needed(int lev, skill_type sk, species_type sp)
if (lev > 27 && you.wizard)
lev = 27;
- ASSERT(lev >= 0);
- ASSERT(lev <= 27);
+ ASSERT_RANGE(lev, 0, 27 + 1);
return exp[lev] * species_apt_factor(sk, sp);
}