summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/random-var.cc
diff options
context:
space:
mode:
authorBrendan Hickey <brendan@bhickey.net>2013-11-15 22:09:48 -0800
committerBrendan Hickey <brendan@bhickey.net>2013-11-15 22:23:40 -0800
commit88d061b7451307158b7e9cf8c83cd09e2ee3c283 (patch)
treef115d2b8bb33c44136bb0f8fdb6df03e5a499758 /crawl-ref/source/random-var.cc
parent02d7e00d420071eed54ccd5a13dff0137a22ee52 (diff)
downloadcrawl-ref-88d061b7451307158b7e9cf8c83cd09e2ee3c283.tar.gz
crawl-ref-88d061b7451307158b7e9cf8c83cd09e2ee3c283.zip
Refactor ASSERT(a && b) again
This commit converts ASSERT(a && b) to ASSERT(a); ASSERT(b); Assertions of the form !(a && b) are left intact, since there isn't an obvious readability gain over (!a || !b).
Diffstat (limited to 'crawl-ref/source/random-var.cc')
-rw-r--r--crawl-ref/source/random-var.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/random-var.cc b/crawl-ref/source/random-var.cc
index 3daf178fc0..cf06461409 100644
--- a/crawl-ref/source/random-var.cc
+++ b/crawl-ref/source/random-var.cc
@@ -54,7 +54,8 @@ void random_var::init()
for (int v = start; v < end; ++v)
total += weight(v);
ASSERT(total > 0);
- ASSERT(weight(start) > 0 && weight(end - 1) > 0);
+ ASSERT(weight(start) > 0);
+ ASSERT(weight(end - 1) > 0);
}
int random_var::roll2val(int r) const