diff options
| author | Marijn Tamis <[email protected]> | 2017-07-31 13:52:20 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2017-07-31 13:52:20 +0200 |
| commit | 223aff8b3f73bb786dce5c67b83ff55208d43969 (patch) | |
| tree | 2e3e2760cb49afbf8d9379e23e27d175bbba27aa /NvCloth/include | |
| parent | Remove unused copy of PxShared. (diff) | |
| download | nvcloth-223aff8b3f73bb786dce5c67b83ff55208d43969.tar.xz nvcloth-223aff8b3f73bb786dce5c67b83ff55208d43969.zip | |
NvCloth 1.1.2 Release. (22576033)v1.1.2
Diffstat (limited to 'NvCloth/include')
| -rw-r--r-- | NvCloth/include/NvCloth/Callbacks.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/NvCloth/include/NvCloth/Callbacks.h b/NvCloth/include/NvCloth/Callbacks.h index 13edaa2..72ebe24 100644 --- a/NvCloth/include/NvCloth/Callbacks.h +++ b/NvCloth/include/NvCloth/Callbacks.h @@ -99,16 +99,31 @@ NV_CLOTH_API(physx::PxAssertHandler*) GetNvClothAssertHandler(); //This function #if !PX_ENABLE_ASSERTS #if PX_VC #define NV_CLOTH_ASSERT(exp) __noop +#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) __noop #else #define NV_CLOTH_ASSERT(exp) ((void)0) +#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) ((void)0) #endif #else +#if PX_VC +#define PX_CODE_ANALYSIS_ASSUME(exp) \ + __analysis_assume(!!(exp)) // This macro will be used to get rid of analysis warning messages if a PX_ASSERT is used + // to "guard" illegal mem access, for example. +#else +#define PX_CODE_ANALYSIS_ASSUME(exp) +#endif #define NV_CLOTH_ASSERT(exp) \ { \ static bool _ignore = false; \ - (static_cast<void>((!!(exp)) || (!_ignore && ((*nv::cloth::GetNvClothAssertHandler())(#exp, __FILE__, __LINE__, _ignore), false)))); \ + ((void)((!!(exp)) || (!_ignore && ((*nv::cloth::GetNvClothAssertHandler())(#exp, __FILE__, __LINE__, _ignore), false)))); \ PX_CODE_ANALYSIS_ASSUME(exp); \ } +#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) \ + { \ + static bool _ignore = false; \ + ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); \ + PX_CODE_ANALYSIS_ASSUME(exp); \ + } #endif //Profiler |