Hi,
nit pick, the usual way to do preprocessor macros with { } is:
#define foo(x) \
do { \
bar \
} while (0)
This way you don't end up with a stray ; after the
} which sometimes can lead to issues / warnings.
IE:
if (x)
foo(x);
else
...
Would not work with your way
Hi,
On Fri, Apr 08, 2011 at 11:48:12AM +0200, Hans de Goede wrote:
nit pick, the usual way to do preprocessor macros with { } is:
I was about to nit pick about the same thing ;)
On a side note, I'm curious about the
#define DEBUG_PRINT(arg) DebugPrint arg
which require using double (( as in
On Fri, Apr 08, 2011 at 11:48:12AM +0200, Hans de Goede wrote:
Hi,
nit pick, the usual way to do preprocessor macros with { } is:
I'll fix.
#define foo(x) \
do { \
bar \
} while (0)
This way you don't end up with a stray ; after the
} which sometimes can lead to issues