From dad39d6e1650bddfb43a38c57faa03d6c0f3097d Mon Sep 17 00:00:00 2001 From: Eric Branlund Date: Fri, 18 Dec 2020 10:01:55 -0800 Subject: [PATCH] Changed to avoid clang's "equality comparison with extraneous parentheses" warnings. --- src/grid/trap.c | 2 +- src/inventory/inventory-damage.c | 2 +- src/mspell/mspell-dispel.c | 2 +- src/mspell/mspell-floor.c | 2 +- src/object/item-tester-hooker.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/grid/trap.c b/src/grid/trap.c index b166bbc25..7e3d598a3 100644 --- a/src/grid/trap.c +++ b/src/grid/trap.c @@ -424,7 +424,7 @@ void hit_trap(player_type *trapped_ptr, bool break_trap) msg_print(_("落とし戸に落ちた!", "You have fallen through a trap door!")); if (is_echizen(trapped_ptr)) msg_print(_("くっそ~!", "")); - else if ((trapped_ptr->pseikaku == PERSONALITY_CHARGEMAN)) + else if (trapped_ptr->pseikaku == PERSONALITY_CHARGEMAN) msg_print(_("ジュラル星人の仕業に違いない!", "")); sound(SOUND_FALL); diff --git a/src/inventory/inventory-damage.c b/src/inventory/inventory-damage.c index 7e1e00f46..8d3564a5a 100644 --- a/src/inventory/inventory-damage.c +++ b/src/inventory/inventory-damage.c @@ -71,7 +71,7 @@ void inventory_damage(player_type *player_ptr, inven_func typ, int perc) #ifdef JP if (is_echizen(player_ptr)) msg_print("やりやがったな!"); - else if ((player_ptr->pseikaku == PERSONALITY_CHARGEMAN)) { + else if (player_ptr->pseikaku == PERSONALITY_CHARGEMAN) { if (randint0(2) == 0) msg_print(_("ジュラル星人め!", "")); else diff --git a/src/mspell/mspell-dispel.c b/src/mspell/mspell-dispel.c index b152a3cd6..51684953f 100644 --- a/src/mspell/mspell-dispel.c +++ b/src/mspell/mspell-dispel.c @@ -122,7 +122,7 @@ void spell_RF4_DISPEL(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_ if (is_echizen(target_ptr)) msg_print(_("やりやがったな!", "")); - else if ((target_ptr->pseikaku == PERSONALITY_CHARGEMAN)) { + else if (target_ptr->pseikaku == PERSONALITY_CHARGEMAN) { if (randint0(2) == 0) msg_print(_("ジュラル星人め!", "")); else diff --git a/src/mspell/mspell-floor.c b/src/mspell/mspell-floor.c index 6f6722858..aa344e96b 100644 --- a/src/mspell/mspell-floor.c +++ b/src/mspell/mspell-floor.c @@ -215,7 +215,7 @@ void spell_RF6_TELE_AWAY(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX if (TARGET_TYPE == MONSTER_TO_PLAYER) { if (is_echizen(target_ptr)) msg_print(_("くっそ~", "")); - else if ((target_ptr->pseikaku == PERSONALITY_CHARGEMAN)) { + else if (target_ptr->pseikaku == PERSONALITY_CHARGEMAN) { if (randint0(2) == 0) msg_print(_("ジュラル星人め!", "")); else diff --git a/src/object/item-tester-hooker.c b/src/object/item-tester-hooker.c index 1b26f6d85..63bef2f02 100644 --- a/src/object/item-tester-hooker.c +++ b/src/object/item-tester-hooker.c @@ -36,7 +36,7 @@ bool item_tester_okay(player_type *player_ptr, object_type *o_ptr, tval_type tva return FALSE; } - if ((item_tester_hook == NULL)) + if (item_tester_hook == NULL) return TRUE; return (*item_tester_hook)(player_ptr, o_ptr); -- 2.11.0