32#include "foundation/PxFoundationConfig.h"
33#include "foundation/Px.h"
54 virtual void operator()(
const char* exp,
const char* file,
int line,
bool& ignore) = 0;
69 #define PX_ASSERT(exp) ((void)0)
70 #define PX_ALWAYS_ASSERT_MESSAGE(exp) ((void)0)
71 #define PX_ASSERT_WITH_MESSAGE(condition, message) ((void)0)
74 #define PX_CODE_ANALYSIS_ASSUME(exp) \
75 __analysis_assume(!!(exp))
78 #define PX_CODE_ANALYSIS_ASSUME(exp)
80 #define PX_ASSERT(exp) \
82 static bool _ignore = false; \
83 ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(#exp, __FILE__, __LINE__, _ignore), false)))); \
84 PX_CODE_ANALYSIS_ASSUME(exp); \
86 #define PX_ALWAYS_ASSERT_MESSAGE(exp) \
88 static bool _ignore = false; \
90 physx::PxGetAssertHandler()(exp, __FILE__, __LINE__, _ignore); \
92 #define PX_ASSERT_WITH_MESSAGE(exp, message) \
94 static bool _ignore = false; \
95 ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); \
96 PX_CODE_ANALYSIS_ASSUME(exp); \
100#define PX_ALWAYS_ASSERT() PX_ASSERT(0)
Base class to handle assert failures.
Definition PxAssert.h:49
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_FOUNDATION_API PX_DEPRECATED void PxSetAssertHandler(PxAssertHandler &handler)
Definition FdAssert.cpp:84
PX_FOUNDATION_API PX_DEPRECATED PxAssertHandler & PxGetAssertHandler()
Definition FdAssert.cpp:79