From 460437f8d13a49302d5ce11cf5ba613083e4780a Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Mon, 31 Dec 2007 02:04:39 +0000 Subject: (From Atari Ace) The attached patch adjusts most conditional logging in MAME to use the idiom "do { if (VERBOSE) logerror x; } while (0)". This has the benefit that the compiler checks the syntax of the logging even in the case it will be eliminated, and in fact a number of cases here needed adjustments to compile because of this. --- src/emu/cpu/konami/konami.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/emu/cpu/konami/konami.c') diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index 83c71f03f78..cc3be47363e 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -39,12 +39,7 @@ #define VERBOSE 0 -#if VERBOSE -#define LOG(x) logerror x -#else -#define LOG(x) -#endif - +#define LOG(x) do { if (VERBOSE) logerror x; } while (0) /* Konami Registers */ typedef struct -- cgit v1.2.3-70-g09d2