mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 11:32:31 +00:00
Use fmt::format for LOGMESSAGERENDER
The format string can be checked at compile time. It will be easier to transition to `std::format`.
This commit is contained in:
10 files changed
+21
-17
No files matched your search
@@ -69,7 +69,7 @@ Status CNetFileTransferer::OnFileTransferResponse(const CFileTransferResponseMes
|
||||
task.length = message.m_Length;
|
||||
task.buffer.reserve(message.m_Length);
|
||||
|
||||
LOGMESSAGERENDER("Downloading data over network (%lu KiB) - please wait...", task.length / KiB);
|
||||
LOGMESSAGERENDER("Downloading data over network ({} KiB) - please wait...", task.length / KiB);
|
||||
m_LastProgressReportTime = timer_Time();
|
||||
|
||||
return INFO::OK;
|
||||
@@ -117,7 +117,7 @@ Status CNetFileTransferer::OnFileTransferData(const CFileTransferDataMessage& me
|
||||
double t = timer_Time();
|
||||
if (t > m_LastProgressReportTime + 0.5)
|
||||
{
|
||||
LOGMESSAGERENDER("Downloading data: %.1f%% of %lu KiB",
|
||||
LOGMESSAGERENDER("Downloading data: {:.1f}% of {} KiB",
|
||||
100.f * task.buffer.size() / task.length, task.length / KiB);
|
||||
m_LastProgressReportTime = t;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user