summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-02 05:14:31 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-02 05:14:31 +0000
commit9ddee55cb06790b2d7ddf07666390614c92bc71d (patch)
tree93b4528b40167b3aeed13ee210e65b5637a3007a /crawl-ref/source/itemname.cc
parent26302842887cde2a029061396d4f9a4df9e312ce (diff)
downloadcrawl-ref-9ddee55cb06790b2d7ddf07666390614c92bc71d.tar.gz
crawl-ref-9ddee55cb06790b2d7ddf07666390614c92bc71d.zip
Fix [ 1902141 ] Documentation wrong
- changed number comments on a few enums - added a few COMPILE_CHECKs so they'll get caught Other: - Fix COMPILE_CHECK macro so it doesn't cause a warning in gcc. - Replace ASSERT(...) with COMPILE_CHECK(...) where possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3501 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 74b30e88d2..2696f6e5b9 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -1294,16 +1294,14 @@ std::string item_def::name_aux( description_level_type desc,
"smoky ", "glowing ", "sedimented ", "metallic ", "murky ",
"gluggy ", "oily ", "slimy ", "emulsified "
};
- ASSERT( sizeof(potion_qualifiers) / sizeof(*potion_qualifiers)
- == PDQ_NQUALS );
+ COMPILE_CHECK( ARRAYSIZE(potion_qualifiers) == PDQ_NQUALS, c1 );
static const char *potion_colours[] = {
"clear", "blue", "black", "silvery", "cyan", "purple",
"orange", "inky", "red", "yellow", "green", "brown", "pink",
"white"
};
- ASSERT( sizeof(potion_colours) / sizeof(*potion_colours)
- == PDC_NCOLOURS );
+ COMPILE_CHECK( ARRAYSIZE(potion_colours) == PDC_NCOLOURS, c1 );
const char *qualifier =
(pqual < 0 || pqual >= PDQ_NQUALS)? "bug-filled "