diff options
author | Neil Moore <neil@s-z.org> | 2014-05-30 17:26:47 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-05-30 17:26:47 -0400 |
commit | 8389a64af8a4601438f1c1633709c760c7b37541 (patch) | |
tree | 70930746c77d92a62e3a6a025eaf2a4465472fa6 /crawl-ref/source/describe.cc | |
parent | 95d9ad379b0ab35895a78de3ba6e5f3fc42bd0e0 (diff) | |
download | crawl-ref-8389a64af8a4601438f1c1633709c760c7b37541.tar.gz crawl-ref-8389a64af8a4601438f1c1633709c760c7b37541.zip |
Simplify a range check.
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r-- | crawl-ref/source/describe.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index f28b34939e..a856e3fc59 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -563,13 +563,7 @@ string trap_name(trap_type trap) { COMPILE_CHECK(ARRAYSZ(trap_names) == NUM_TRAPS); - if ( -#if TAG_MAJOR_VERSION == 34 - trap >= TRAP_DART -#else - trap >= TRAP_ARROW -#endif - && trap < NUM_TRAPS) + if (trap >= 0 && trap < NUM_TRAPS) return trap_names[trap]; return ""; } |