From f05679db8e0a5ff4182ab046dec2f3e4b61c7c06 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Tue, 6 Aug 2019 23:09:31 +0300 Subject: [PATCH] Implement DPRINTF using fmt --- src/celutil/debug.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/celutil/debug.cpp b/src/celutil/debug.cpp index 43e54d66..fe323fc1 100644 --- a/src/celutil/debug.cpp +++ b/src/celutil/debug.cpp @@ -13,6 +13,7 @@ #include #include #include +#include static int debugVerbosity = 0; @@ -28,15 +29,15 @@ void DebugPrint(int level, const char *format, ...) if (IsDebuggerPresent()) { char buf[1024]; - vsprintf(buf, format, args); + fmt::vsprintf(buf, format, args); OutputDebugStringA(buf); } else { - vfprintf(stdout, format, args); + fmt::vfprintf(stdout, format, args); } #else - vfprintf(stderr, format, args); + fmt::vfprintf(stderr, format, args); #endif }