mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 11:12:03 +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
@@ -66,7 +66,7 @@ bool Exception::CatchPending(const Request& rq)
|
||||
{
|
||||
CStr error;
|
||||
FromJSVal(rq, excn, error);
|
||||
LOGERROR("JavaScript error: %s", error);
|
||||
LOGERROR("JavaScript error: {}", error);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ bool Exception::CatchPending(const Request& rq)
|
||||
{
|
||||
CStr error;
|
||||
FromJSVal(rq, excn, error);
|
||||
LOGERROR("JavaScript error: %s", error);
|
||||
LOGERROR("JavaScript error: {}", error);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ bool Exception::CatchPending(const Request& rq)
|
||||
msg << "\n " << line;
|
||||
}
|
||||
|
||||
LOGERROR("%s", msg.str().c_str());
|
||||
LOGERROR("{}", msg.str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -120,4 +120,4 @@ void Exception::Raise(const Request& rq, const char* format, ...)
|
||||
JS_ReportErrorUTF8(rq.cx, "%s", buffer);
|
||||
}
|
||||
|
||||
} // namespace Script
|
||||
} // namespace Script
|
||||
Reference in new issue
Block a user