summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 134e9fb544..0047599d6f 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -585,21 +585,23 @@ bool item_is_critical(const item_def &item)
// Is item something that no one would bother enchanting?
bool item_is_mundane(const item_def &item)
{
- bool retval = false;
-
switch (item.base_type)
{
case OBJ_WEAPONS:
- retval = (item.sub_type == WPN_CLUB
- || item.sub_type == WPN_GIANT_CLUB
- || item.sub_type == WPN_GIANT_SPIKED_CLUB
- || item.sub_type == WPN_KNIFE);
+ if (item.sub_type == WPN_CLUB
+ || item.sub_type == WPN_GIANT_CLUB
+ || item.sub_type == WPN_GIANT_SPIKED_CLUB
+ || item.sub_type == WPN_KNIFE)
+ {
+ return (true);
+ }
break;
+
default:
break;
}
- return (retval);
+ return (false);
}
void set_ident_flags( item_def &item, unsigned long flags )