diff options
author | Neil Moore <neil@s-z.org> | 2014-07-30 22:14:13 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-07-30 22:14:13 -0400 |
commit | 2f4550dfab9ebb1f70f6cf054e9d469128c2db1c (patch) | |
tree | af465c97df6b33071923a8305a61ca0596e7636f /crawl-ref/source/item_use.cc | |
parent | c168e25fd00e68049cb82a46bfc883f704dbb5fc (diff) | |
download | crawl-ref-2f4550dfab9ebb1f70f6cf054e9d469128c2db1c.tar.gz crawl-ref-2f4550dfab9ebb1f70f6cf054e9d469128c2db1c.zip |
Make an array static and check its size.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index c865feb037..f8218ae84b 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -548,7 +548,8 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) for (int s = EQ_HELMET; s <= EQ_BOOTS; s++) { // No strange race can wear this. - const char* parts[] = { "head", "hands", "feet" }; + static const char * const parts[] = { "head", "hands", "feet" }; + COMPILE_CHECK(ARRAYSZ(parts) == EQ_BOOTS - EQ_HELMET + 1); // Auto-disrobing would be nice. if (you.equip[s] != -1) { |