Skip to content

Commit 5c467bc

Browse files
committed
Added missing parentheses.
1 parent a90f5a2 commit 5c467bc

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static Int getNextSelectablePlayer(Int start)
171171
static Int getFirstSelectablePlayer(const GameInfo *game)
172172
{
173173
const GameSlot *slot = game->getConstSlot(game->getLocalSlotNum());
174-
if (!game->amIHost() || slot && slot->getPlayerTemplate() != PLAYERTEMPLATE_OBSERVER)
174+
if (!game->amIHost() || (slot && slot->getPlayerTemplate() != PLAYERTEMPLATE_OBSERVER))
175175
return game->getLocalSlotNum();
176176

177177
for (Int i=0; i<MAX_SLOTS; ++i)

GeneralsMD/Code/GameEngine/Source/Common/System/BuildAssistant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ LegalBuildCode BuildAssistant::isLocationClearOfObjects( const Coord3D *worldPos
706706
//Prevent busy units (black lotus hacking from being moved by trying to place a building -- exploit).
707707
if( rel == ALLIES )
708708
{
709-
if( them->testStatus( OBJECT_STATUS_IS_USING_ABILITY ) || them->getAI() && them->getAI()->isBusy() )
709+
if( them->testStatus( OBJECT_STATUS_IS_USING_ABILITY ) || (them->getAI() && them->getAI()->isBusy()) )
710710
{
711711
return LBC_OBJECTS_IN_THE_WAY;
712712
}

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static Int getNextSelectablePlayer(Int start)
178178
static Int getFirstSelectablePlayer(const GameInfo *game)
179179
{
180180
const GameSlot *slot = game->getConstSlot(game->getLocalSlotNum());
181-
if (!game->amIHost() || slot && slot->getPlayerTemplate() != PLAYERTEMPLATE_OBSERVER)
181+
if (!game->amIHost() || (slot && slot->getPlayerTemplate() != PLAYERTEMPLATE_OBSERVER))
182182
return game->getLocalSlotNum();
183183

184184
for (Int i=0; i<MAX_SLOTS; ++i)

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2568,7 +2568,7 @@ static Int getNextSelectablePlayer(Int start)
25682568
static Int getFirstSelectablePlayer(const GameInfo *game)
25692569
{
25702570
const GameSlot *slot = game->getConstSlot(game->getLocalSlotNum());
2571-
if (!game->amIHost() || slot && slot->getPlayerTemplate() != PLAYERTEMPLATE_OBSERVER)
2571+
if (!game->amIHost() || (slot && slot->getPlayerTemplate() != PLAYERTEMPLATE_OBSERVER))
25722572
return game->getLocalSlotNum();
25732573

25742574
for (Int i=0; i<MAX_SLOTS; ++i)

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4208,8 +4208,8 @@ CanAttackResult InGameUI::getCanSelectedObjectsAttack( ActionType action, const
42084208
//John McDonald added this code back in Oct 09, 2002.
42094209
//Replaced it with palatable code.
42104210
//if( (objectToInteractWith == NULL) != (action == ACTIONTYPE_SET_RALLY_POINT)) <---BAD CODE
4211-
if( !objectToInteractWith && action != ACTIONTYPE_SET_RALLY_POINT || //No object to interact with (and not rally point mode)
4212-
objectToInteractWith && action == ACTIONTYPE_SET_RALLY_POINT ) //Object to interact with (and rally point mode)
4211+
if( (!objectToInteractWith && action != ACTIONTYPE_SET_RALLY_POINT) || //No object to interact with (and not rally point mode)
4212+
(objectToInteractWith && action == ACTIONTYPE_SET_RALLY_POINT) ) //Object to interact with (and rally point mode)
42134213
{
42144214
//Sanity check OR can't set a rally point over an object.
42154215
return ATTACKRESULT_NOT_POSSIBLE;
@@ -4307,8 +4307,8 @@ Bool InGameUI::canSelectedObjectsDoAction( ActionType action, const Object *obje
43074307
//because it would be nice if a saboteur could actually sabotage a building via a
43084308
//commandbutton.
43094309
//if( (objectToInteractWith == NULL) != (action == ACTIONTYPE_SET_RALLY_POINT))
4310-
if( !objectToInteractWith && action != ACTIONTYPE_SET_RALLY_POINT || //No object to interact with (and not rally point mode)
4311-
objectToInteractWith && action == ACTIONTYPE_SET_RALLY_POINT ) //Object to interact with (and rally point mode)
4310+
if( (!objectToInteractWith && action != ACTIONTYPE_SET_RALLY_POINT) || //No object to interact with (and not rally point mode)
4311+
(objectToInteractWith && action == ACTIONTYPE_SET_RALLY_POINT) ) //Object to interact with (and rally point mode)
43124312
{
43134313
//Sanity check OR can't set a rally point over an object.
43144314
return FALSE;

GeneralsMD/Code/GameEngine/Source/GameClient/Input/Mouse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ void Mouse::setCursorTooltip( UnicodeString tooltip, Int delay, const RGBColor *
857857
m_lastTooltipWidth = width;
858858
}
859859

860-
if (forceRecalc || !m_isTooltipEmpty && tooltip.compare(m_tooltipDisplayString->getText()))
860+
if (forceRecalc || (!m_isTooltipEmpty && tooltip.compare(m_tooltipDisplayString->getText())))
861861
{
862862
m_tooltipDisplayString->setText(tooltip);
863863
//DEBUG_LOG(("Tooltip: %ls\n", tooltip.str()));

GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,8 +1435,8 @@ GameMessage::Type CommandTranslator::evaluateContextCommand( Drawable *draw,
14351435
//Added: shrubberies are the exception for interactions...
14361436
//Removed: GS Took out ObjectStatusUnselectable, since that status only prevents selection, not everything
14371437
if( obj == NULL ||
1438-
obj->getStatusBits().test( OBJECT_STATUS_MASKED ) &&
1439-
!obj->isKindOf(KINDOF_SHRUBBERY) && !obj->isKindOf(KINDOF_FORCEATTACKABLE) )
1438+
(obj->getStatusBits().test( OBJECT_STATUS_MASKED ) &&
1439+
!obj->isKindOf(KINDOF_SHRUBBERY) && !obj->isKindOf(KINDOF_FORCEATTACKABLE)) )
14401440
{
14411441
//Nulling out the draw and obj pointer will force the remainder of this code to evaluate
14421442
//a position interaction.
@@ -3049,7 +3049,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
30493049
if (TheGameLogic->isInMultiplayerGame() && !TheGameLogic->isInReplayGame())
30503050
{
30513051
Player *localPlayer = ThePlayerList->getLocalPlayer();
3052-
if (localPlayer && localPlayer->isPlayerActive() || !TheGlobalData->m_netMinPlayers)
3052+
if ((localPlayer && localPlayer->isPlayerActive()) || !TheGlobalData->m_netMinPlayers)
30533053
{
30543054
ToggleInGameChat();
30553055
SetInGameChatType( INGAME_CHAT_ALLIES );
@@ -3063,7 +3063,7 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
30633063
if (TheGameLogic->isInMultiplayerGame() && !TheGameLogic->isInReplayGame())
30643064
{
30653065
Player *localPlayer = ThePlayerList->getLocalPlayer();
3066-
if (localPlayer && localPlayer->isPlayerActive() || !TheGlobalData->m_netMinPlayers)
3066+
if ((localPlayer && localPlayer->isPlayerActive()) || !TheGlobalData->m_netMinPlayers)
30673067
{
30683068
ToggleInGameChat();
30693069
SetInGameChatType( INGAME_CHAT_EVERYONE );

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/FlightDeckBehavior.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,11 @@ Bool FlightDeckBehavior::reserveRunway(ObjectID id, Bool forLanding)
667667
}
668668

669669
RunwayInfo& info = m_runways[runway];
670-
if( info.m_inUseByForTakeoff == id && !forLanding || info.m_inUseByForLanding == id && forLanding )
670+
if( (info.m_inUseByForTakeoff == id && !forLanding) || (info.m_inUseByForLanding == id && forLanding) )
671671
{
672672
return true;
673673
}
674-
else if( info.m_inUseByForTakeoff == INVALID_ID && !forLanding || info.m_inUseByForLanding == INVALID_ID && forLanding )
674+
else if( (info.m_inUseByForTakeoff == INVALID_ID && !forLanding) || (info.m_inUseByForLanding == INVALID_ID && forLanding) )
675675
{
676676
if( forLanding )
677677
{

GeneralsMD/Code/GameEngine/Source/GameNetwork/ConnectionManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ void ConnectionManager::processChat(NetChatCommandMsg *msg)
666666

667667
Bool fromObserver = !player->isPlayerActive();
668668
Bool amIObserver = !ThePlayerList->getLocalPlayer()->isPlayerActive();
669-
Bool canSeeChat = amIObserver || !fromObserver && !TheGameInfo->getConstSlot(playerID)->isMuted();
669+
Bool canSeeChat = amIObserver || (!fromObserver && !TheGameInfo->getConstSlot(playerID)->isMuted());
670670

671671
if ( ((1<<m_localSlot) & msg->getPlayerMask() ) && canSeeChat )
672672
{

0 commit comments

Comments
 (0)