summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-03-24 17:29:07 +0100
committerBardur Arantsson <bardur@scientician.net>2013-03-24 17:29:49 +0100
commitd39105ff82a42cbedbb1b68683aefce050228551 (patch)
treebb67a76299e7b6e2c16aa19da34156d3a63f8861
parent2ebf28b8a8bc486913ba21b4b852a407988f67cb (diff)
Clang warning fix
-rw-r--r--src/q_fireprof.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/q_fireprof.c b/src/q_fireprof.c
index 4405d43b..3afa348f 100644
--- a/src/q_fireprof.c
+++ b/src/q_fireprof.c
@@ -119,17 +119,19 @@ static bool_ fireproof_enough_points(object_type *o_ptr, int *stack)
/* check for item type and multiply number in the stack by the
* amount of points per item of that type */
- if (o_ptr->tval == TV_BOOK)
+ switch (o_ptr->tval)
{
+ case TV_BOOK:
item_value = FIREPROOF_BOOK_POINTS * (*stack);
- }
- else if (o_ptr->tval == TV_STAFF)
- {
+ break;
+ case TV_STAFF:
item_value = FIREPROOF_STAFF_POINTS * (*stack);
- }
- else if (o_ptr->tval == TV_SCROLL)
- {
+ break;
+ case TV_SCROLL:
item_value = FIREPROOF_SCROLL_POINTS * (*stack);
+ break;
+ default:
+ assert(FALSE);
}
/* do we have enough points? */