mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 11:51:10 +00:00
Use fmt::format for LOGMESSAGE
The format string can be checked at compile time. It will be easier to transition to `std::format`.
This commit is contained in:
26 files changed
+108
-90
No files matched your search
@@ -120,7 +120,7 @@ void CNetClientSession::Poll()
|
||||
// Report the server address immediately.
|
||||
char hostname[256] = "(error)";
|
||||
enet_address_get_host_ip(&event.peer->address, hostname, ARRAY_SIZE(hostname));
|
||||
LOGMESSAGE("Net client: Connected to %s:%u", hostname, (unsigned int)event.peer->address.port);
|
||||
LOGMESSAGE("Net client: Connected to {}:{}", hostname, event.peer->address.port);
|
||||
m_Connected = true;
|
||||
m_WasConnected = true;
|
||||
|
||||
@@ -177,7 +177,8 @@ void CNetClientSession::ProcessPolledMessages()
|
||||
CNetMessage* msg = CNetMessageFactory::CreateMessage(event.packet->data, event.packet->dataLength, m_Client.GetScriptInterface());
|
||||
if (msg)
|
||||
{
|
||||
LOGMESSAGE("Net client: Received message %s of size %lu from server", msg->ToString().c_str(), (unsigned long)msg->GetSerializedLength());
|
||||
LOGMESSAGE("Net client: Received message {} of size {} from server",
|
||||
msg->ToString(), msg->GetSerializedLength());
|
||||
|
||||
m_Client.HandleMessage(msg);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user