diff options
author | peterbell10 <peterbell10@live.co.uk> | 2018-01-03 18:41:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-03 18:41:16 +0100 |
commit | 757231cc6e777b8f4717d1467ef7efa01c7fde15 (patch) | |
tree | 6d1021761ad1c492700fe17560cb79520e508d60 /Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp | |
parent | Concrete mixing (#4096) (diff) | |
download | cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.gz cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.bz2 cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.lz cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.xz cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.zst cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.zip |
Diffstat (limited to '')
-rw-r--r-- | Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp b/Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp index 0efaf9a59..31418b008 100644 --- a/Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp +++ b/Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp @@ -10,6 +10,7 @@ #define PROT_INT_BUFFER_SIZE (130 * 130) #include "Generating/ProtIntGen.h" +#include "fmt/printf.h" @@ -20,7 +21,6 @@ typedef int Color[3]; // Color is an array of 3 ints // Forward declarations, needed for GCC and Clang: -void log(const char * a_Fmt, ...) FORMATSTRING(1, 2); void outputBitmapFile( const AString & a_FileName, unsigned a_ImageSizeX, unsigned a_ImageSizeY, @@ -155,14 +155,12 @@ biomeColorMap[] = -void log(const char * a_Fmt, ...) +template <typename ... Args> +void log(const char * a_Fmt, const Args & ... a_Args) { - AString buf; - va_list args; - va_start(args, a_Fmt); - AppendVPrintf(buf, a_Fmt, args); - va_end(args); - std::cout << buf << std::endl << std::flush; + fmt::printf(a_Fmt, a_Args...); + putchar('\n'); + fflush(stdout); } |