Recast Navigation
Navigation-mesh Toolset for Games
Loading...
Searching...
No Matches
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 callback function.
 

Functions

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

Macro Definition Documentation

◆ rcAssert

#define rcAssert (   expression)
Value:
{ \
if (failFunc == NULL) { assert(expression); } \
else if (!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
}
void() rcAssertFailFunc(const char *expression, const char *file, int line)
An assertion failure callback function.
Definition RecastAssert.h:27
rcAssertFailFunc * rcAssertFailGetCustom()
Gets the base custom assertion failure function to be used by Recast.
Definition RecastAssert.cpp:28

Typedef Documentation

◆ rcAssertFailFunc

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

An assertion failure callback function.

Parameters
[in]expressionAsserted expression.
[in]fileFilename of the failed assertion.
[in]lineLine number of the failed assertion.
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 callback function to be used by Recast.

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