Use fmt::format for LOGERROR

The format string can be checked at compile time. It will be easier to
transition to `std::format`.
This commit is contained in:
phosit committed 2026-10-05 20:29:26 +02:00
1 parent ba158aa3ff
commit 369a7e7e5d
115 files changed
+631 -454

No files matched your search

+4 -9
View File
@@ -63,10 +63,8 @@ void CNetServerTurnManager::NotifyFinishedClientCommands(CNetServerSession& sess
// Clients must advance one turn at a time
if (turn != m_ClientsData[client].readyTurn + 1)
{
LOGERROR("NotifyFinishedClientCommands: Client %d (%s) is ready for turn %d, but expected %d",
client,
utf8_from_wstring(session.GetUserName()).c_str(),
turn,
LOGERROR("NotifyFinishedClientCommands: Client {} ({}) is ready for turn {}, but expected {}",
client, utf8_from_wstring(session.GetUserName()), turn,
m_ClientsData[client].readyTurn + 1);
session.Disconnect(NDR_INCORRECT_READY_TURN_COMMANDS);
@@ -119,11 +117,8 @@ void CNetServerTurnManager::NotifyFinishedClientUpdate(CNetServerSession& sessio
// Clients must advance one turn at a time
if (turn != m_ClientsData[client].simulatedTurn + 1)
{
LOGERROR("NotifyFinishedClientUpdate: Client %d (%s) is ready for turn %d, but expected %d",
client,
utf8_from_wstring(playername).c_str(),
turn,
m_ClientsData[client].simulatedTurn + 1);
LOGERROR("NotifyFinishedClientUpdate: Client {} ({}) is ready for turn {}, but expected {}",
client, utf8_from_wstring(playername), turn, m_ClientsData[client].simulatedTurn + 1);
session.Disconnect(NDR_INCORRECT_READY_TURN_SIMULATED);
return;