src/common.h

changeset 322
5e701c3c3d8e
parent 321
48e429bfd58c
child 327
9ea604af1319
--- a/src/common.h	Wed Jul 03 00:43:27 2013 +0300
+++ b/src/common.h	Thu Jul 04 03:05:39 2013 +0300
@@ -248,11 +248,15 @@
 	LOG_Dev,
 };
 
-// logf - universal access to the message log. Defined here so that I don't have
-// to include gui.h here and recompile everything every time that file changes.
-// logf is defined in main.cpp
-void logf (const char* fmtstr, ...) FORMAT_PRINTF (1, 2);
-void logf (LogType type, const char* fmtstr, ...) FORMAT_PRINTF (2, 3);
+// log() - universal access to the message log. Defined here so that I don't have
+// to include msglog.h here and recompile everything every time that file changes.
+void DoLog( std::initializer_list<StringFormatArg> args );
+#ifndef IN_IDE_PARSER
+# define log(...) DoLog({ __VA_ARGS__ });
+#else
+void log( const char* fmtstr, ... );
+#endif
+
 // -----------------------------------------------------------------------------
 // Vertex at (0, 0, 0)
 extern const vertex g_origin;

mercurial