30 #ifndef PXFOUNDATION_PXASSERT_H 31 #define PXFOUNDATION_PXASSERT_H 50 virtual void operator()(
const char* exp,
const char* file,
int line,
bool& ignore) = 0;
60 #if !PX_ENABLE_ASSERTS 61 #define PX_ASSERT(exp) ((void)0) 62 #define PX_ALWAYS_ASSERT_MESSAGE(exp) ((void)0) 63 #define PX_ASSERT_WITH_MESSAGE(condition, message) ((void)0) 66 #define PX_CODE_ANALYSIS_ASSUME(exp) \ 67 __analysis_assume(!!(exp)) // This macro will be used to get rid of analysis warning messages if a PX_ASSERT is used 70 #define PX_CODE_ANALYSIS_ASSUME(exp) 72 #define PX_ASSERT(exp) \ 74 static bool _ignore = false; \ 75 ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(#exp, __FILE__, __LINE__, _ignore), false)))); \ 76 PX_CODE_ANALYSIS_ASSUME(exp); \ 78 #define PX_ALWAYS_ASSERT_MESSAGE(exp) \ 80 static bool _ignore = false; \ 82 physx::PxGetAssertHandler()(exp, __FILE__, __LINE__, _ignore); \ 84 #define PX_ASSERT_WITH_MESSAGE(exp, message) \ 86 static bool _ignore = false; \ 87 ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); \ 88 PX_CODE_ANALYSIS_ASSUME(exp); \ 92 #define PX_ALWAYS_ASSERT() PX_ASSERT(0) 95 #endif // #ifndef PXFOUNDATION_PXASSERT_H Definition: GuContactBuffer.h:37
virtual ~PxAssertHandler()
Definition: PxAssert.h:47
Definition: PxAssert.h:44
PX_FOUNDATION_API void PxSetAssertHandler(PxAssertHandler &handler)
PX_FOUNDATION_API PxAssertHandler & PxGetAssertHandler()
#define PX_FOUNDATION_API
Definition: PxPreprocessor.h:318