aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-05-14 19:53:02 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-14 20:01:26 +0200
commit29b79e4c0ea6b83281ba782d109a77bac47933d8 (patch)
treebad3aee8e8bbce5b6e150eb5a29db33943dd5dc6 /src/util.h
parenta6f18e4686d764a62905b8d8cd316dcbd40bb17d (diff)
Get rid of snprintf (except one) with fixed buffers, shorten code
- Use strprintf or vstrprintf instead of snprintf
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 1 insertions, 5 deletions
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);