summaryrefslogtreecommitdiffstats
path: root/Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-01-03 18:41:16 +0100
committerGitHub <noreply@github.com>2018-01-03 18:41:16 +0100
commit757231cc6e777b8f4717d1467ef7efa01c7fde15 (patch)
tree6d1021761ad1c492700fe17560cb79520e508d60 /Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp
parentConcrete mixing (#4096) (diff)
downloadcuberite-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 'Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp')
-rw-r--r--Tools/GrownBiomeGenVisualiser/GrownBiomeGenVisualiser.cpp14
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);
}