Skip to content

Commit c01d696

Browse files
authored
fix(log): Fix missing debug log arguments (#1325)
1 parent c07a276 commit c01d696

File tree

13 files changed

+17
-17
lines changed

13 files changed

+17
-17
lines changed

Core/GameEngine/Source/Common/Audio/GameAudio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ Bool AudioManager::shouldPlayLocally(const AudioEventRTS *audioEvent)
10421042
Player *owningPlayer = ThePlayerList->getNthPlayer(audioEvent->getPlayerIndex());
10431043

10441044
if (BitIsSet(ei->m_type, ST_PLAYER) && BitIsSet(ei->m_type, ST_UI) && owningPlayer == NULL) {
1045-
DEBUG_ASSERTCRASH(!TheGameLogic->isInGameLogicUpdate(), ("Playing %s sound -- player-based UI sound without specifying a player."));
1045+
DEBUG_ASSERTCRASH(!TheGameLogic->isInGameLogicUpdate(), ("Playing %s sound -- player-based UI sound without specifying a player.", ei->m_audioName.str()));
10461046
return TRUE;
10471047
}
10481048

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ static void refreshGameList( Bool forceRefresh )
862862
//DEBUG_LOG(("-"));
863863
}
864864
} else {
865-
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d"));
865+
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d", gameListRefreshTime, refreshInterval));
866866
}
867867
}
868868
//-------------------------------------------------------------------------------------------------
@@ -1301,7 +1301,7 @@ void WOLLobbyMenuUpdate( WindowLayout * layout, void *userData)
13011301
//DEBUG_LOG(("-"));
13021302
}
13031303
} else {
1304-
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d"));
1304+
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d", gameListRefreshTime, refreshInterval));
13051305
}
13061306
#else
13071307
refreshGameList();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4188,7 +4188,7 @@ CanAttackResult InGameUI::getCanSelectedObjectsAttack( ActionType action, const
41884188
case ACTIONTYPE_MAKE_DEFECTOR:
41894189
case ACTIONTYPE_SET_RALLY_POINT:
41904190
default:
4191-
DEBUG_CRASH( ("Called InGameUI::getCanSelectedObjectsAttack() with actiontype %d. Only accepts attack types! Should you be calling InGameUI::canSelectedObjectsDoAction() instead?") );
4191+
DEBUG_CRASH( ("Called InGameUI::getCanSelectedObjectsAttack() with actiontype %d. Only accepts attack types! Should you be calling InGameUI::canSelectedObjectsDoAction() instead?", action) );
41924192
return ATTACKRESULT_INVALID_SHOT;
41934193

41944194
}

Generals/Code/GameEngine/Source/GameClient/MessageStream/MetaEvent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static const char * findGameMessageNameByType(GameMessage::Type type)
353353
if (metaNames->value == (Int)type)
354354
return metaNames->name;
355355

356-
DEBUG_CRASH(("MetaTypeName %d not found -- did you remember to add it to GameMessageMetaTypeNames[] ?"));
356+
DEBUG_CRASH(("MetaTypeName %d not found -- did you remember to add it to GameMessageMetaTypeNames[] ?", (Int)type));
357357
return "???";
358358
}
359359

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ void ConnectionManager::processAckStage1(NetCommandMsg *msg) {
850850
ref = m_connections[playerID]->processAck(msg);
851851
}
852852
} else {
853-
DEBUG_ASSERTCRASH((playerID >= 0) && (playerID < NUM_CONNECTIONS), ("ConnectionManager::processAck - %d is an invalid player number"));
853+
DEBUG_ASSERTCRASH((playerID >= 0) && (playerID < NUM_CONNECTIONS), ("ConnectionManager::processAck - %d is an invalid player number", playerID));
854854
}
855855

856856
if (ref != NULL) {

Generals/Code/GameEngine/Source/GameNetwork/FirewallHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ UnsignedShort FirewallHelperClass::getNextTemporarySourcePort(Int skip)
291291
closeSpareSocket(return_port);
292292
return(return_port);
293293
} else {
294-
DEBUG_LOG(("FirewallHelperClass::getNextTemporarySourcePort - failed to open socket on port %d"));
294+
DEBUG_LOG(("FirewallHelperClass::getNextTemporarySourcePort - failed to open socket on port %d", return_port));
295295
}
296296
}
297297

@@ -998,7 +998,7 @@ Bool FirewallHelperClass::detectionTest3WaitForResponsesUpdate() {
998998
*/
999999
m_sourcePortAllocationDelta = m_lastSourcePortAllocationDelta;
10001000
}
1001-
DEBUG_LOG(("FirewallHelperClass::detectionTest3WaitForResponsesUpdate - didn't get enough responses, using %d as the source port allocation delta, finished test"));
1001+
DEBUG_LOG(("FirewallHelperClass::detectionTest3WaitForResponsesUpdate - didn't get enough responses, using %d as the source port allocation delta, finished test", m_sourcePortAllocationDelta));
10021002
m_currentState = DETECTIONSTATE_DONE;
10031003
return TRUE;
10041004
}

Generals/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ void W3DGhostObject::xfer( Xfer *xfer )
671671
if( snapshotCount == 0 && m_parentSnapshots[ i ] != NULL )
672672
{
673673

674-
DEBUG_CRASH(( "W3DGhostObject::xfer - m_parentShapshots[ %d ] has data present but the count from the xfer stream is empty" ));
674+
DEBUG_CRASH(( "W3DGhostObject::xfer - m_parentShapshots[ %d ] has data present but the count from the xfer stream is empty", i ));
675675
throw INI_INVALID_DATA;
676676

677677
} // end if

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ static void refreshGameList( Bool forceRefresh )
880880
//DEBUG_LOG(("-"));
881881
}
882882
} else {
883-
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d"));
883+
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d", gameListRefreshTime, refreshInterval));
884884
}
885885
}
886886
//-------------------------------------------------------------------------------------------------
@@ -1320,7 +1320,7 @@ void WOLLobbyMenuUpdate( WindowLayout * layout, void *userData)
13201320
//DEBUG_LOG(("-"));
13211321
}
13221322
} else {
1323-
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d"));
1323+
//DEBUG_LOG(("gameListRefreshTime: %d refreshInterval: %d", gameListRefreshTime, refreshInterval));
13241324
}
13251325
#else
13261326
refreshGameList();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4348,7 +4348,7 @@ CanAttackResult InGameUI::getCanSelectedObjectsAttack( ActionType action, const
43484348
case ACTIONTYPE_MAKE_DEFECTOR:
43494349
case ACTIONTYPE_SET_RALLY_POINT:
43504350
default:
4351-
DEBUG_CRASH( ("Called InGameUI::getCanSelectedObjectsAttack() with actiontype %d. Only accepts attack types! Should you be calling InGameUI::canSelectedObjectsDoAction() instead?") );
4351+
DEBUG_CRASH( ("Called InGameUI::getCanSelectedObjectsAttack() with actiontype %d. Only accepts attack types! Should you be calling InGameUI::canSelectedObjectsDoAction() instead?", action) );
43524352
return ATTACKRESULT_INVALID_SHOT;
43534353

43544354
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static const char * findGameMessageNameByType(GameMessage::Type type)
391391
if (metaNames->value == (Int)type)
392392
return metaNames->name;
393393

394-
DEBUG_CRASH(("MetaTypeName %d not found -- did you remember to add it to GameMessageMetaTypeNames[] ?"));
394+
DEBUG_CRASH(("MetaTypeName %d not found -- did you remember to add it to GameMessageMetaTypeNames[] ?", (Int)type));
395395
return "???";
396396
}
397397

0 commit comments

Comments
 (0)