summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-05-30 17:26:47 -0400
committerNeil Moore <neil@s-z.org>2014-05-30 17:26:47 -0400
commit8389a64af8a4601438f1c1633709c760c7b37541 (patch)
tree70930746c77d92a62e3a6a025eaf2a4465472fa6 /crawl-ref/source/describe.cc
parent95d9ad379b0ab35895a78de3ba6e5f3fc42bd0e0 (diff)
downloadcrawl-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.cc8
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 "";
}