Recast Navigation
Navigation-mesh Toolset for Games
RecastAssert.h File Reference
#include <assert.h>

Go to the source code of this file.

Macros

#define rcAssert(expression)
 

Typedefs

typedef void() rcAssertFailFunc(const char *expression, const char *file, int line)
 An assertion failure function. More...
 

Functions

void rcAssertFailSetCustom (rcAssertFailFunc *assertFailFunc)
 Sets the base custom assertion failure function to be used by Recast. More...
 
rcAssertFailFuncrcAssertFailGetCustom ()
 Gets the base custom assertion failure function to be used by Recast. More...
 

Macro Definition Documentation

◆ rcAssert

#define rcAssert (   expression)
Value:
{ \
rcAssertFailFunc* failFunc = rcAssertFailGetCustom(); \
if (failFunc == NULL) { assert(expression); } \
else if (!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
}
rcAssertFailFunc * rcAssertFailGetCustom()
Gets the base custom assertion failure function to be used by Recast.
Definition: RecastAssert.cpp:30

Typedef Documentation

◆ rcAssertFailFunc

typedef void() rcAssertFailFunc(const char *expression, const char *file, int line)

An assertion failure function.

See also
rcAssertFailSetCustom

Function Documentation

◆ rcAssertFailGetCustom()

rcAssertFailFunc* rcAssertFailGetCustom ( )

Gets the base custom assertion failure function to be used by Recast.

◆ rcAssertFailSetCustom()

void rcAssertFailSetCustom ( rcAssertFailFunc assertFailFunc)

Sets the base custom assertion failure function to be used by Recast.

Parameters
[in]assertFailFuncThe function to be used in case of failure of dtAssert