19 #ifndef RECASTASSERT_H
20 #define RECASTASSERT_H
22 #ifdef RC_DISABLE_ASSERTS
25 # define rcAssert(x) do { (void)sizeof(x); } while ((void)(__LINE__==-1), false)
44 # define rcAssert(expression) \
46 rcAssertFailFunc* failFunc = rcAssertFailGetCustom(); \
47 if (failFunc == NULL) { assert(expression); } \
48 else if (!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
void() rcAssertFailFunc(const char *expression, const char *file, int line)
An assertion failure function.
Definition: RecastAssert.h:34
void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc)
Sets the base custom assertion failure function to be used by Recast.
Definition: RecastAssert.cpp:25
rcAssertFailFunc * rcAssertFailGetCustom()
Gets the base custom assertion failure function to be used by Recast.
Definition: RecastAssert.cpp:30