From 305dc1001bf3181409feb2e8b0c49b9788b1b290 Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 13 Apr 2008 14:19:08 +0000 Subject: (svn r12685) -Codechange: DebugDumpCommands() couldn't be inlined, define it as a macro instead --- src/debug.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 */ -- cgit v1.2.3-70-g09d2