mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 15:31:16 +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
@@ -181,7 +181,7 @@ Paths::Paths(const CmdLineArgs& args)
|
||||
std::error_code ec{};
|
||||
const std::filesystem::path cpath{std::filesystem::canonical(rpath, ec)};
|
||||
if (ec)
|
||||
LOGERROR("Failed to get absolute path of argv0, reason: %s", ec.message());
|
||||
LOGERROR("Failed to get absolute path of argv0, reason: {}", ec.message());
|
||||
else
|
||||
pathname = OsPath(cpath.wstring());
|
||||
}
|
||||
@@ -189,7 +189,7 @@ Paths::Paths(const CmdLineArgs& args)
|
||||
// make sure it's valid
|
||||
if(!std::filesystem::is_regular_file(pathname.string()))
|
||||
{
|
||||
LOGERROR("Cannot find executable (expected at '%s')", pathname.string8());
|
||||
LOGERROR("Cannot find executable (expected at '{}')", pathname.string8());
|
||||
WARN_IF_ERR(StatusFromErrno());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user