summaryrefslogtreecommitdiff
path: root/src/debug.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-13 14:19:08 +0000
committersmatz <smatz@openttd.org>2008-04-13 14:19:08 +0000
commit821ef83af9b82bc039af30d12e842c3eba532f6c (patch)
tree2b119f7e7237f6efd84bdeb8f28e0cff6dfa0458 /src/debug.h
parent67bb680d263376786d500f0c7159ffec0691e035 (diff)
downloadopenttd-821ef83af9b82bc039af30d12e842c3eba532f6c.tar.xz
(svn r12685) -Codechange: DebugDumpCommands() couldn't be inlined, define it as a macro instead
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/debug.h b/src/debug.h
index 5df7bfae8..15f9f8c31 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -103,7 +103,13 @@ void CDECL ShowInfoF(const char *str, ...);
#ifdef DEBUG_DUMP_COMMANDS
void CDECL DebugDumpCommands(const char *s, ...);
#else /* DEBUG_DUMP_COMMANDS */
- static inline void DebugDumpCommands(const char *s, ...) {}
+ /* when defined as an empty function with variable argument list,
+ * it can't be inlined - so define it as an empty macro */
+ #if defined(__GNUC__) && (__GNUC__ < 3)
+ #define DebugDumpCommands(s, args...)
+ #else
+ #define DebugDumpCommands(s, ...)
+ #endif
#endif /* DEBUG_DUMP_COMMANDS */
#endif /* DEBUG_H */