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

Go to the source code of this file.

Macros

#define dtAssert(expression)
 

Typedefs

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

Functions

void dtAssertFailSetCustom (dtAssertFailFunc *assertFailFunc)
 Sets the base custom assertion failure function to be used by Detour. More...
 
dtAssertFailFuncdtAssertFailGetCustom ()
 Gets the base custom assertion failure function to be used by Detour. More...
 

Macro Definition Documentation

◆ dtAssert

#define dtAssert (   expression)
Value:
{ \
dtAssertFailFunc* failFunc = dtAssertFailGetCustom(); \
if(failFunc == NULL) { assert(expression); } \
else if(!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
}
dtAssertFailFunc * dtAssertFailGetCustom()
Gets the base custom assertion failure function to be used by Detour.
Definition: DetourAssert.cpp:30

Typedef Documentation

◆ dtAssertFailFunc

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

An assertion failure function.

See also
dtAssertFailSetCustom

Function Documentation

◆ dtAssertFailGetCustom()

dtAssertFailFunc* dtAssertFailGetCustom ( )

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

◆ dtAssertFailSetCustom()

void dtAssertFailSetCustom ( dtAssertFailFunc assertFailFunc)

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

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