diff --git a/RecastAlloc_8h_source.html b/RecastAlloc_8h_source.html index ace9da70..658f351f 100644 --- a/RecastAlloc_8h_source.html +++ b/RecastAlloc_8h_source.html @@ -509,7 +509,7 @@ $(document).ready(function(){initNavTree('RecastAlloc_8h_source.html',''); initR
rcLikely
#define rcLikely(x)
Macros to hint to the compiler about the likeliest branch.
Definition RecastAlloc.h:85
rcAllocSetCustom
void rcAllocSetCustom(rcAllocFunc *allocFunc, rcFreeFunc *freeFunc)
Sets the base custom allocation functions to be used by Recast.
Definition RecastAlloc.cpp:34
RecastAssert.h
-
rcAssert
#define rcAssert(expression)
Definition RecastAssert.h:44
+
rcAssert
#define rcAssert(expression)
Definition RecastAssert.h:41
rcIntArray
Legacy class. Prefer rcVector<int>.
Definition RecastAlloc.h:368
rcIntArray::clear
void clear()
Definition RecastAlloc.h:375
rcIntArray::pop
int pop()
Definition RecastAlloc.h:376
diff --git a/RecastAssert_8cpp.html b/RecastAssert_8cpp.html index 1df8178a..fddfd2ab 100644 --- a/RecastAssert_8cpp.html +++ b/RecastAssert_8cpp.html @@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('RecastAssert_8cpp.html',''); initResiz

Functions

void rcAssertFailSetCustom (rcAssertFailFunc *assertFailFunc) - Sets the base custom assertion failure function to be used by Recast.
+ Sets the base custom assertion failure callback function to be used by Recast.
  rcAssertFailFunc * rcAssertFailGetCustom ()  Gets the base custom assertion failure function to be used by Recast.
@@ -151,7 +151,7 @@ Variables
-

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

+

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

Parameters
diff --git a/RecastAssert_8h.html b/RecastAssert_8h.html index 68f7a6a4..15cb7f02 100644 --- a/RecastAssert_8h.html +++ b/RecastAssert_8h.html @@ -112,13 +112,13 @@ Macros - +
[in]assertFailFuncThe function to be used in case of failure of dtAssert

Typedefs

typedef void() rcAssertFailFunc(const char *expression, const char *file, int line)
 An assertion failure function.
 An assertion failure callback function.
 
- + @@ -145,8 +145,8 @@ Functions
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 function.
Definition RecastAssert.h:34
-
rcAssertFailFunc * rcAssertFailGetCustom()
Gets the base custom assertion failure function to be used by Recast.
Definition RecastAssert.cpp:30
+
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
@@ -163,8 +163,16 @@ Functions

Functions

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

An assertion failure function.

-
See also
rcAssertFailSetCustom
+

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
@@ -204,7 +212,7 @@ Functions
-

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

+

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

Parameters
diff --git a/RecastAssert_8h_source.html b/RecastAssert_8h_source.html index b4ecbc38..fbbc3463 100644 --- a/RecastAssert_8h_source.html +++ b/RecastAssert_8h_source.html @@ -122,38 +122,31 @@ $(document).ready(function(){initNavTree('RecastAssert_8h_source.html',''); init
19#ifndef RECASTASSERT_H
20#define RECASTASSERT_H
21
-
22#ifdef RC_DISABLE_ASSERTS
-
23
-
24// From https://web.archive.org/web/20210117002833/http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/
-
25# define rcAssert(x) do { (void)sizeof(x); } while ((void)(__LINE__==-1), false)
-
26
-
27#else
+
27typedef void (rcAssertFailFunc)(const char* expression, const char* file, int line);
28
-
30// @param[in] expression asserted expression.
-
31// @param[in] file Filename of the failed assertion.
-
32// @param[in] line Line number of the failed assertion.
-
34typedef void (rcAssertFailFunc)(const char* expression, const char* file, int line);
+
31void rcAssertFailSetCustom(rcAssertFailFunc* assertFailFunc);
+
32
+
35
-
38void rcAssertFailSetCustom(rcAssertFailFunc* assertFailFunc);
-
39
- -
42
-
43# include <assert.h>
-
-
44# define rcAssert(expression) \
-
45 { \
-
46 rcAssertFailFunc* failFunc = rcAssertFailGetCustom(); \
-
47 if (failFunc == NULL) { assert(expression); } \
-
48 else if (!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
-
49 }
+
36#ifdef RC_DISABLE_ASSERTS
+
37// From https://web.archive.org/web/20210117002833/http://cnicholson.net/2009/02/stupid-c-tricks-adventures-in-assert/
+
38# define rcAssert(x) do { (void)sizeof(x); } while ((void)(__LINE__==-1), false)
+
39#else
+
40# include <assert.h>
+
+
41# define rcAssert(expression) \
+
42 { \
+
43 rcAssertFailFunc* failFunc = rcAssertFailGetCustom(); \
+
44 if (failFunc == NULL) { assert(expression); } \
+
45 else if (!(expression)) { (*failFunc)(#expression, __FILE__, __LINE__); } \
+
46 }
-
50
-
51#endif
-
52
-
53#endif // RECASTASSERT_H
-
void() rcAssertFailFunc(const char *expression, const char *file, int line)
An assertion failure function.
Definition RecastAssert.h:34
-
rcAssertFailFunc * rcAssertFailGetCustom()
Gets the base custom assertion failure function to be used by Recast.
Definition RecastAssert.cpp:30
-
void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc)
Sets the base custom assertion failure function to be used by Recast.
Definition RecastAssert.cpp:25
+
47#endif // !defined(RC_DISABLE_ASSERTS)
+
48
+
49#endif // RECASTASSERT_H
+
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
+
void rcAssertFailSetCustom(rcAssertFailFunc *assertFailFunc)
Sets the base custom assertion failure callback function to be used by Recast.
Definition RecastAssert.cpp:23
[in]assertFailFuncThe function to be used in case of failure of dtAssert