diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-06-08 20:22:21 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-06-08 20:22:21 +0200 |
commit | 258af752a1d6f6dc337c97e8ceabf26bcb974f31 (patch) | |
tree | dd0a724b9c936b2fc8c497a6d8089d5afcf7c68d /crawl-ref/source/chardump.cc | |
parent | a2c649a2645682eb974353707775e599f1f2ce96 (diff) | |
download | crawl-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/chardump.cc')
-rw-r--r-- | crawl-ref/source/chardump.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index a7e1095323..767192c206 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -1219,8 +1219,7 @@ 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); - ASSERT(subtype < NUM_UCAT); + ASSERT_RANGE(subtype, 1, NUM_UCAT); return _stab_names[subtype]; default: return "Error"; |