change BLI_assert() so it can be included in other defines.

This commit is contained in:
Campbell Barton
2011-12-19 03:06:44 +00:00
parent 9d3e755b4c
commit d0aa012b0a

View File

@@ -279,24 +279,22 @@
# endif
# if defined(__GNUC__) || defined(_MSC_VER) /* check __func__ is available */
# define BLI_assert(a) \
do { \
if (!(a)) { \
(void)((!(a)) ? ( \
( \
fprintf(stderr, \
"BLI_assert failed: %s, %s(), %d at \'%s\'\n", \
__FILE__, __func__, __LINE__, STRINGIFY(a)); \
_dummy_abort(); \
} \
} while (0)
__FILE__, __func__, __LINE__, STRINGIFY(a)), \
_dummy_abort(), \
NULL)) : NULL)
# else
# define BLI_assert(a) \
do { \
if (0 == (a)) { \
# define BLI_assert(a) \
(void)((!(a)) ? ( \
( \
fprintf(stderr, \
"BLI_assert failed: %s, %d at \'%s\'\n", \
__FILE__, __LINE__, STRINGIFY(a)); \
_dummy_abort(); \
} \
} while (0)
__FILE__, __LINE__, STRINGIFY(a)), \
_dummy_abort(), \
NULL)) : NULL)
# endif
#else
# define BLI_assert(a) (void)0