diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-15 11:58:46 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-15 11:58:46 +0100 |
commit | 9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8 (patch) | |
tree | efb230bb7347f59c3d8b5ea5fe2be1e538214eb2 /source/StringUtils.cpp | |
parent | More valgrind uninitialized var fixing (diff) | |
download | cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.tar cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.tar.gz cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.tar.bz2 cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.tar.lz cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.tar.xz cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.tar.zst cuberite-9f4b6ffc6c6095aceb0e5fccd4d73d45adbf1ca8.zip |
Diffstat (limited to '')
-rw-r--r-- | source/StringUtils.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/StringUtils.cpp b/source/StringUtils.cpp index b651cc6b9..161a8a168 100644 --- a/source/StringUtils.cpp +++ b/source/StringUtils.cpp @@ -57,7 +57,7 @@ AString & AppendVPrintf(AString & str, const char *format, va_list args) -AString & Printf(AString & str, const char *format, ...) +AString & Printf(AString & str, const char * format, ...) { str.clear(); va_list args; @@ -71,6 +71,20 @@ AString & Printf(AString & str, const char *format, ...) +AString Printf(const char * format, ...) +{ + AString res; + va_list args; + va_start(args, format); + AppendVPrintf(res, format, args); + va_end(args); + return res; +} + + + + + AString & AppendPrintf(AString &str, const char *format, ...) { va_list args; |