WUtil: change 'wassertr(v)' to still perform check even if NDEBUG is set
commit0350026866be6d180d750297567e55c0e8c2005d
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 17 May 2014 22:56:45 +0000 (18 00:56 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 18 May 2014 22:00:16 +0000 (18 23:00 +0100)
tree1aa6cd7b60d2ad70530e310d9d017148c3c493dd
parentc5f103984ae7e54de0616cf48d37af4295c95bdc
WUtil: change 'wassertr(v)' to still perform check even if NDEBUG is set

In many places of the code these functions are counting on the "return"
effect of these macros to gracefully handle incorrect arguments. So, when
debug is not enabled, if it is okay to not display a message it is however
not good to completely skip the check and skip the early return.

This patch changes the macro to always perform the check and return to
avoid crashes, displaying a message only when NDEBUG is not set.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WINGs/WINGs/WUtil.h