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:
phosit committed 2026-10-05 20:29:25 +02:00
1 parent 43cb3100b6
commit d686708c92
10 files changed
+21 -17

No files matched your search

+2 -2
View File
@@ -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;
}