From 29b79e4c0ea6b83281ba782d109a77bac47933d8 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 14 May 2012 19:53:02 +0200 Subject: Get rid of snprintf (except one) with fixed buffers, shorten code - Use strprintf or vstrprintf instead of snprintf --- src/util.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 8e65fa7864..79f8a7a5b0 100644 --- a/src/util.h +++ b/src/util.h @@ -43,11 +43,6 @@ static const int64 CENT = 1000000; #define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0])) #define printf OutputDebugStringF -#ifdef snprintf -#undef snprintf -#endif -#define snprintf my_snprintf - #ifndef PRI64d #if defined(_MSC_VER) || defined(__MSVCRT__) #define PRI64d "I64d" @@ -133,6 +128,7 @@ int my_snprintf(char* buffer, size_t limit, const char* format, ...); */ std::string real_strprintf(const std::string &format, int dummy, ...); #define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__) +std::string vstrprintf(const std::string &format, va_list ap); bool error(const char *format, ...); void LogException(std::exception* pex, const char* pszThread); -- cgit v1.2.3