summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-delve.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-06-08 20:22:21 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-06-08 20:22:21 +0200
commit258af752a1d6f6dc337c97e8ceabf26bcb974f31 (patch)
treedd0a724b9c936b2fc8c497a6d8089d5afcf7c68d /crawl-ref/source/dgn-delve.cc
parenta2c649a2645682eb974353707775e599f1f2ce96 (diff)
downloadcrawl-ref-258af752a1d6f6dc337c97e8ceabf26bcb974f31.tar.gz
crawl-ref-258af752a1d6f6dc337c97e8ceabf26bcb974f31.zip
Turn pairs of assertions with x > min, x <= max into ASSERT_RANGE.
The perl regexp to do so is: s&ASSERT\(([^\n]+) >= ([^\n]+)\);\s*ASSERT\(\1 < ([^\n]+)\);&ASSERT_RANGE($1, $2, $3);&sg;
Diffstat (limited to 'crawl-ref/source/dgn-delve.cc')
-rw-r--r--crawl-ref/source/dgn-delve.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/dgn-delve.cc b/crawl-ref/source/dgn-delve.cc
index e2642bc795..93a1362e86 100644
--- a/crawl-ref/source/dgn-delve.cc
+++ b/crawl-ref/source/dgn-delve.cc
@@ -178,8 +178,7 @@ static int cellnum_est(int world, int ngb_min, int ngb_max)
{
static int denom[12] = {0, 0, 8, 7, 6, 5, 5, 4, 4, 4, 3, 3};
ASSERT(world > 0);
- ASSERT(ngb_min + ngb_max >= 2);
- ASSERT(ngb_min + ngb_max < 12);
+ ASSERT_RANGE(ngb_min + ngb_max, 2, 12);
return world / denom[ngb_min + ngb_max];
}