From 757231cc6e777b8f4717d1467ef7efa01c7fde15 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Wed, 3 Jan 2018 17:41:16 +0000 Subject: Add the fmt library (#4065) * Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style. --- Tools/MCADefrag/Globals.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'Tools/MCADefrag/Globals.h') diff --git a/Tools/MCADefrag/Globals.h b/Tools/MCADefrag/Globals.h index 4fe9db648..f8fd68b6a 100644 --- a/Tools/MCADefrag/Globals.h +++ b/Tools/MCADefrag/Globals.h @@ -22,13 +22,6 @@ #define ALIGN_8 #define ALIGN_16 - #define FORMATSTRING(formatIndex, va_argsIndex) - - // MSVC has its own custom version of zu format - #define SIZE_T_FMT "%Iu" - #define SIZE_T_FMT_PRECISION(x) "%" #x "Iu" - #define SIZE_T_FMT_HEX "%Ix" - #define NORETURN __declspec(noreturn) #elif defined(__GNUC__) @@ -44,12 +37,6 @@ // Some portability macros :) #define stricmp strcasecmp - #define FORMATSTRING(formatIndex, va_argsIndex) - - #define SIZE_T_FMT "%zu" - #define SIZE_T_FMT_PRECISION(x) "%" #x "zu" - #define SIZE_T_FMT_HEX "%zx" - #define NORETURN __attribute((__noreturn__)) #else @@ -69,8 +56,6 @@ #define ALIGN_16 */ - #define FORMATSTRING(formatIndex, va_argsIndex) __attribute__((format (printf, formatIndex, va_argsIndex))) - #endif @@ -190,6 +175,7 @@ typedef unsigned char Byte; // Common headers (without macros): +#include "fmt/format.h" #include "StringUtils.h" #include "OSSupport/CriticalSection.h" #include "OSSupport/Event.h" -- cgit v1.2.3