Go to the documentation of this file.
14 #ifndef PX_FOUNDATION_PX_ASSERT_H
15 #define PX_FOUNDATION_PX_ASSERT_H
32 virtual void operator()(
const char* exp,
const char* file,
int line,
bool& ignore) = 0;
42 #if (!defined(PX_DEBUG) && !(defined(PX_CHECKED) && defined(PX_ENABLE_CHECKED_ASSERTS))) || defined(__CUDACC__)
43 # define PX_ASSERT(exp) ((void)0)
44 # define PX_ALWAYS_ASSERT_MESSAGE(exp) ((void)0)
45 # define PX_ASSERT_WITH_MESSAGE(condition, message) ((void)0)
46 #elif !defined(__SPU__)
47 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
49 #define PX_CODE_ANALYSIS_ASSUME(exp) __analysis_assume(!!(exp))
51 #define PX_CODE_ANALYSIS_ASSUME(exp)
53 # define PX_ASSERT(exp) { static bool _ignore = false; ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(#exp, __FILE__, __LINE__, _ignore), false)))); PX_CODE_ANALYSIS_ASSUME(exp); }
54 # define PX_ALWAYS_ASSERT_MESSAGE(exp) { static bool _ignore = false; if(!_ignore)physx::PxGetAssertHandler()(exp, __FILE__, __LINE__, _ignore); }
55 # define PX_ASSERT_WITH_MESSAGE(exp, message) {static bool _ignore = false; ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); PX_CODE_ANALYSIS_ASSUME(exp);}
57 # include "ps3/PxPS3Assert.h"
60 #define PX_ALWAYS_ASSERT() PX_ASSERT(0)
63 #endif // PX_FOUNDATION_PX_ASSERT_H
Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com