From c9522fb740200ccef6230cec452c48efb31e5394 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 11 May 2023 22:05:17 +0200 Subject: Removed all Printf-family functions from StringUtils. Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments. Also fixed code-style violations already present in the code. --- src/LoggerListeners.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/LoggerListeners.cpp') diff --git a/src/LoggerListeners.cpp b/src/LoggerListeners.cpp index 0d4c6eb1d..eccbc5292 100644 --- a/src/LoggerListeners.cpp +++ b/src/LoggerListeners.cpp @@ -256,15 +256,15 @@ class cFileListener { public: - cFileListener(void) {} + cFileListener() {} bool Open() { // Assume creation succeeds, as the API does not provide a way to tell if the folder exists. cFile::CreateFolder("logs"); bool success = m_File.Open( - Printf( - "logs/LOG_%d.txt", + fmt::format( + FMT_STRING("logs/LOG_{}.txt"), std::chrono::duration_cast>>( std::chrono::system_clock::now().time_since_epoch() ).count() -- cgit v1.2.3