1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Resolve Sonar issues in server code

This commit is contained in:
Ivan Savenko
2025-05-24 22:50:03 +03:00
parent f9e88557ca
commit cc6f65d8da
24 changed files with 295 additions and 349 deletions

View File

@@ -99,10 +99,10 @@ void TurnTimerHandler::update(int waitTimeMs)
// create copy for iterations - battle might end during onBattleLoop call
std::vector<BattleID> ongoingBattles;
for (auto & battle : gameHandler.gameState().currentBattles)
for (const auto & battle : gameHandler.gameState().currentBattles)
ongoingBattles.push_back(battle->battleID);
for (auto & battleID : ongoingBattles)
for (const auto & battleID : ongoingBattles)
onBattleLoop(battleID, waitTimeMs);
}