OSDN Git Service

Changed to avoid clang's warnings about whether "((x == y))" was intended to be ...
authorEric Branlund <ebranlund@fastmail.com>
Tue, 9 Feb 2021 19:36:27 +0000 (11:36 -0800)
committerEric Branlund <ebranlund@fastmail.com>
Tue, 9 Feb 2021 19:36:27 +0000 (11:36 -0800)
src/player/player-status.c

index eb7942f..b90b955 100644 (file)
@@ -2987,14 +2987,14 @@ static s16b calc_to_damage(player_type *creature_ptr, INVENTORY_IDX slot, bool i
             break;
 
         case MELEE_TYPE_WEAPON_DOUBLE:
-            if ((calc_hand == PLAYER_HAND_MAIN)) {
+            if (calc_hand == PLAYER_HAND_MAIN) {
                 if (i == INVEN_MAIN_RING) {
                     damage += (s16b)bonus_to_d;
                 } else if (i != INVEN_SUB_RING) {
                     damage += (bonus_to_d > 0) ? (bonus_to_d + 1) / 2 : bonus_to_d;
                 }
             }
-            if ((calc_hand == PLAYER_HAND_SUB)) {
+            if (calc_hand == PLAYER_HAND_SUB) {
                 if (i == INVEN_SUB_RING) {
                     damage += (s16b)bonus_to_d;
                 } else if (i != INVEN_MAIN_RING) {
@@ -3220,14 +3220,14 @@ static s16b calc_to_hit(player_type *creature_ptr, INVENTORY_IDX slot, bool is_r
             break;
 
         case MELEE_TYPE_WEAPON_DOUBLE:
-            if ((calc_hand == PLAYER_HAND_MAIN)) {
+            if (calc_hand == PLAYER_HAND_MAIN) {
                 if (i == INVEN_MAIN_RING) {
                     hit += (s16b)bonus_to_h;
                 } else if (i != INVEN_SUB_RING) {
                     hit += (bonus_to_h > 0) ? (bonus_to_h + 1) / 2 : bonus_to_h;
                 }
             }
-            if ((calc_hand == PLAYER_HAND_SUB)) {
+            if (calc_hand == PLAYER_HAND_SUB) {
                 if (i == INVEN_SUB_RING) {
                     hit += (s16b)bonus_to_h;
                 } else if (i != INVEN_MAIN_RING) {