30 #ifndef PX_FOUNDATION_PX_ASSERT_H 31 #define PX_FOUNDATION_PX_ASSERT_H 52 virtual void operator()(
const char* exp,
const char* file,
int line,
bool& ignore) = 0;
58 #if !PX_ENABLE_ASSERTS 59 #define PX_ASSERT(exp) ((void)0) 60 #define PX_ALWAYS_ASSERT_MESSAGE(exp) ((void)0) 61 #define PX_ASSERT_WITH_MESSAGE(condition, message) ((void)0) 64 #define PX_CODE_ANALYSIS_ASSUME(exp) \ 65 __analysis_assume(!!(exp)) // This macro will be used to get rid of analysis warning messages if a PX_ASSERT is used 68 #define PX_CODE_ANALYSIS_ASSUME(exp) 70 #define PX_ASSERT(exp) \ 72 static bool _ignore = false; \ 73 ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(#exp, __FILE__, __LINE__, _ignore), false)))); \ 74 PX_CODE_ANALYSIS_ASSUME(exp); \ 76 #define PX_ALWAYS_ASSERT_MESSAGE(exp) \ 78 static bool _ignore = false; \ 80 physx::PxGetAssertHandler()(exp, __FILE__, __LINE__, _ignore); \ 82 #define PX_ASSERT_WITH_MESSAGE(exp, message) \ 84 static bool _ignore = false; \ 85 ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); \ 86 PX_CODE_ANALYSIS_ASSUME(exp); \ 88 #endif // !PX_ENABLE_ASSERTS 90 #define PX_ALWAYS_ASSERT() PX_ASSERT(0) 98 #endif // PX_FOUNDATION_PX_ASSERT_H Definition: GuContactBuffer.h:37
PX_FOUNDATION_API PX_DEPRECATED PxAssertHandler & PxGetAssertHandler()
virtual ~PxAssertHandler()
Definition: PxAssert.h:49
PX_FOUNDATION_API PX_DEPRECATED void PxSetAssertHandler(PxAssertHandler &handler)
Definition: PxAssert.h:46
#define PX_DEPRECATED
Definition: PxPreprocessor.h:424
#define PX_FOUNDATION_API
Definition: PxFoundationConfig.h:51