diff options
author | Shmuale Mark <shm.mark@gmail.com> | 2014-06-13 10:28:44 -0400 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-06-13 10:28:44 -0400 |
commit | 7030879d1fdf7cad6f53692c25d204996fd82ad4 (patch) | |
tree | 7859b12699a49c99d94e55d86b5451e38a151dc2 /crawl-ref/source/itemname.cc | |
parent | 8af576bb84461be6a5b5768535cc65038cd960c7 (diff) | |
download | crawl-ref-7030879d1fdf7cad6f53692c25d204996fd82ad4.tar.gz crawl-ref-7030879d1fdf7cad6f53692c25d204996fd82ad4.zip |
Simplify, and correct some messages.
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r-- | crawl-ref/source/itemname.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 9c83e7d601..40878144f1 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -446,7 +446,7 @@ static const char* _missile_brand_name(special_missile_type brand, mbn_type t) const char* weapon_brand_name(const item_def& item, bool terse, int override_brand) { - switch (override_brand == -1 ? get_weapon_brand(item) : override_brand) + switch (override_brand ? override_brand : get_weapon_brand(item)) { case SPWPN_NORMAL: return ""; case SPWPN_FLAMING: return terse ? "flame" : "flaming"; @@ -1227,8 +1227,8 @@ string ego_type_string(const item_def &item, bool terse, int override_brand) case OBJ_WEAPONS: if (!terse) { - int checkbrand = override_brand == -1 ? get_weapon_brand(item) - : override_brand; + int checkbrand = override_brand ? override_brand + : get_weapon_brand(item); // this is specialcased out of weapon_brand_name // ("vampiric hand axe", etc) if (checkbrand == SPWPN_VAMPIRICISM) |