diff options
author | Brendan Hickey <brendan@bhickey.net> | 2013-04-28 23:26:25 -0700 |
---|---|---|
committer | Brendan Hickey <brendan@bhickey.net> | 2013-04-28 23:54:23 -0700 |
commit | 23222fdd521c999d61b2cbdee7fe4d87a234cf8c (patch) | |
tree | b23dd3877fd266625ceb389873a9bd94d7379951 /crawl-ref/source/chardump.cc | |
parent | 926959ac5bd809f4014e5ad2f47bbe778e5760e8 (diff) | |
download | crawl-ref-23222fdd521c999d61b2cbdee7fe4d87a234cf8c.tar.gz crawl-ref-23222fdd521c999d61b2cbdee7fe4d87a234cf8c.zip |
Refactor ASSERT(a && b) -> ASSERT(a); ASSERT(b);
Convert conjunctive assertions into separate assertions. This ought to be correctness preserving. I ran the stress tests and didn't notice anything unusual. While I have confidence in it, if you are the slightest bit suspicious of this, please roll it back.
Found instances with `ASSERT(\([^(|]*\) && \([^)|]*\))`
Manually inspected each instance.
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r-- | crawl-ref/source/chardump.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index e7c6bf94cf..c5331ba06d 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -1219,7 +1219,8 @@ static string _describe_action_subtype(caction_type type, int subtype) return uppercase_first(base_type_string((object_class_type)subtype)); case CACT_STAB: COMPILE_CHECK(ARRAYSZ(_stab_names) == NUM_UCAT); - ASSERT(subtype >= 1 && subtype < NUM_UCAT); + ASSERT(subtype >= 1); + ASSERT(subtype < NUM_UCAT); return _stab_names[subtype]; default: return "Error"; |