diff options
author | Bardur Arantsson <bardur@scientician.net> | 2013-03-24 17:29:07 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2013-03-24 17:29:49 +0100 |
commit | d39105ff82a42cbedbb1b68683aefce050228551 (patch) | |
tree | bb67a76299e7b6e2c16aa19da34156d3a63f8861 /src/q_fireprof.c | |
parent | 2ebf28b8a8bc486913ba21b4b852a407988f67cb (diff) |
Clang warning fix
Diffstat (limited to 'src/q_fireprof.c')
-rw-r--r-- | src/q_fireprof.c | 16 |
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? */ |