diff options
author | Brendan Hickey <brendan@bhickey.net> | 2013-11-15 22:09:48 -0800 |
---|---|---|
committer | Brendan Hickey <brendan@bhickey.net> | 2013-11-15 22:23:40 -0800 |
commit | 88d061b7451307158b7e9cf8c83cd09e2ee3c283 (patch) | |
tree | f115d2b8bb33c44136bb0f8fdb6df03e5a499758 /crawl-ref/source/random-var.cc | |
parent | 02d7e00d420071eed54ccd5a13dff0137a22ee52 (diff) | |
download | crawl-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.cc | 3 |
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 |