mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 10:29:00 +00:00
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:
115 files changed
+631
-454
No files matched your search
@@ -126,7 +126,7 @@ MESSAGEHANDLER(InitSDL)
|
||||
// http://trac.wxwidgets.org/ticket/9213
|
||||
// http://trac.wxwidgets.org/ticket/9215
|
||||
if (SDL_GL_LoadLibrary(nullptr) && g_Logger)
|
||||
LOGERROR("SDL failed to load GL library: '%s'", SDL_GetError());
|
||||
LOGERROR("SDL failed to load GL library: '{}'", SDL_GetError());
|
||||
}
|
||||
|
||||
MESSAGEHANDLER(InitGraphics)
|
||||
|
||||
@@ -415,7 +415,7 @@ QUERYHANDLER(ExpandBiomes)
|
||||
});
|
||||
}
|
||||
else
|
||||
LOGERROR("Error reading biome files in %s", toExpand);
|
||||
LOGERROR("Error reading biome files in {}", toExpand);
|
||||
|
||||
}
|
||||
|
||||
@@ -506,7 +506,7 @@ BEGIN_COMMAND(ResizeMap)
|
||||
entity_id_t ent = sim.AddEntity(deleted.templateName.FromUTF8(), deleted.entityId);
|
||||
if (ent == INVALID_ENTITY)
|
||||
{
|
||||
LOGERROR("Failed to load entity template '%s'", deleted.templateName.c_str());
|
||||
LOGERROR("Failed to load entity template '{}'", deleted.templateName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1077,7 +1077,7 @@ BEGIN_COMMAND(DeleteObjects)
|
||||
entity_id_t ent = sim.AddEntity(oldObjects[i].templateName.FromUTF8(), oldObjects[i].entityID);
|
||||
if (ent == INVALID_ENTITY)
|
||||
{
|
||||
LOGERROR("Failed to load entity template '%s'", oldObjects[i].templateName.c_str());
|
||||
LOGERROR("Failed to load entity template '{}'", oldObjects[i].templateName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -52,7 +52,7 @@ void MessagePasserImpl::Add(IMessage* msg)
|
||||
debug_warn(L"Unrecognized message");
|
||||
// CLogger might not be initialised, but this error will be sent
|
||||
// to the debug output window anyway so people can still see it
|
||||
LOGERROR("Unrecognized message (%s)", msg->GetName());
|
||||
LOGERROR("Unrecognized message ({})", msg->GetName());
|
||||
}
|
||||
// Delete the object - we took ownership of it.
|
||||
AtlasMessage::ShareableDelete(msg);
|
||||
@@ -76,7 +76,7 @@ void MessagePasserImpl::Query(QueryMessage* msg, void(* /*timeoutCallback*/ )())
|
||||
debug_warn(L"Unrecognized message");
|
||||
// CLogger might not be initialised, but this error will be sent
|
||||
// to the debug output window anyway so people can still see it
|
||||
LOGERROR("Unrecognized message (%s)", msg->GetName());
|
||||
LOGERROR("Unrecognized message ({})", msg->GetName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ AtlasViewActor* AtlasView::GetView_Actor()
|
||||
}
|
||||
catch (const CSimulation2::LoadScriptError& e)
|
||||
{
|
||||
LOGERROR("%s", e.what());
|
||||
LOGERROR("{}", e.what());
|
||||
}
|
||||
return view_Actor;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user