diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-06-08 20:29:11 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-06-08 20:29:11 +0200 |
commit | ae1dc47dc5b5f48957eb44396ab153acc38ef712 (patch) | |
tree | db3ffa00832ac001005b52002abc1650cd7f426b /crawl-ref/source/dgn-delve.cc | |
parent | 258af752a1d6f6dc337c97e8ceabf26bcb974f31 (diff) | |
download | crawl-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/dgn-delve.cc')
-rw-r--r-- | crawl-ref/source/dgn-delve.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/dgn-delve.cc b/crawl-ref/source/dgn-delve.cc index 93a1362e86..02c506d10b 100644 --- a/crawl-ref/source/dgn-delve.cc +++ b/crawl-ref/source/dgn-delve.cc @@ -236,12 +236,10 @@ static int _make_seed(map_lines *map, store_type& store) void delve(map_lines *map, int ngb_min, int ngb_max, int connchance, int cellnum, int top) { - ASSERT(ngb_min >= 1); - ASSERT(ngb_min <= 3); + ASSERT_RANGE(ngb_min, 1, 4); ASSERT(ngb_min <= ngb_max); ASSERT(ngb_max <= 8); - ASSERT(connchance >= 0); - ASSERT(connchance <= 100); + ASSERT_RANGE(connchance, 0, 101); store_type store; int world = _make_seed(map, store); |