changeset 8915:4d9b06c6a98d draft

(svn r12685) -Codechange: DebugDumpCommands() couldn't be inlined, define it as a macro instead
author smatz <smatz@openttd.org>
date Sun, 13 Apr 2008 14:19:08 +0000
parents 3559eb7e49a4
children 45c397c7d804
files src/debug.h
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/debug.h
+++ b/src/debug.h
@@ -103,7 +103,13 @@
 #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 */