From: cuz Date: Wed, 16 May 2001 13:05:06 +0000 (+0000) Subject: Use :? operator to allow use in expressions X-Git-Tag: V2.12.0~2835 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1d3ea5cde0e5f48574afed35f542b680d105ae10;p=cc65 Use :? operator to allow use in expressions git-svn-id: svn://svn.cc65.org/cc65/trunk@728 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/common/check.h b/src/common/check.h index 38b132438..e0a211392 100644 --- a/src/common/check.h +++ b/src/common/check.h @@ -78,10 +78,10 @@ extern void (*CheckFailed) (const char* Msg, const char* Cond, */ #define PRECONDITION(c) \ - { if (!(c)) CheckFailed (MsgPrecondition, #c, __FILE__, __LINE__); } + ((c)? 0 : (CheckFailed (MsgPrecondition, #c, __FILE__, __LINE__), 0)) #define CHECK(c) \ - { if (!(c)) CheckFailed (MsgCheckFailed, #c, __FILE__, __LINE__); } + ((c)? 0 : (CheckFailed (MsgCheckFailed, #c, __FILE__, __LINE__), 0))