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/OSSupport/File.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/OSSupport/File.cpp') diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index 618463bd6..ba90f4038 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -666,7 +666,7 @@ unsigned cFile::GetLastModificationTime(const AString & a_FileName) -AString cFile::GetPathSeparator(void) +AString cFile::GetPathSeparator() { #ifdef _WIN32 return "\\"; @@ -679,7 +679,7 @@ AString cFile::GetPathSeparator(void) -AString cFile::GetExecutableExt(void) +AString cFile::GetExecutableExt() { #ifdef _WIN32 return ".exe"; @@ -692,18 +692,7 @@ AString cFile::GetExecutableExt(void) -int cFile::vPrintf(const char * a_Format, fmt::printf_args a_ArgList) -{ - fmt::memory_buffer Buffer; - fmt::vprintf(Buffer, fmt::to_string_view(a_Format), a_ArgList); - return Write(Buffer.data(), Buffer.size()); -} - - - - - -void cFile::Flush(void) +void cFile::Flush() { fflush(m_File); } -- cgit v1.2.3