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.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/OSSupport/File.h') diff --git a/src/OSSupport/File.h b/src/OSSupport/File.h index 7a3333483..975b78cd7 100644 --- a/src/OSSupport/File.h +++ b/src/OSSupport/File.h @@ -158,25 +158,18 @@ public: /** Returns the path separator used by the current platform. Note that the platform / CRT may support additional path separators (such as slashes on Windows), these don't get reported. */ - static AString GetPathSeparator(void); + static AString GetPathSeparator(); /** Returns the customary executable extension used by the current platform. */ - static AString GetExecutableExt(void); + static AString GetExecutableExt(); // tolua_end /** Returns the list of all items in the specified folder (files, folders, nix pipes, whatever's there). */ static AStringVector GetFolderContents(const AString & a_Folder); // Exported in ManualBindings.cpp - int vPrintf(const char * a_Format, fmt::printf_args a_ArgList); - template - int Printf(const char * a_Format, const Args & ... a_Args) - { - return vPrintf(a_Format, fmt::make_printf_args(a_Args...)); - } - /** Flushes all the bufferef output into the file (only when writing) */ - void Flush(void); + void Flush(); private: FILE * m_File; -- cgit v1.2.3