From db5c9867e2ffde3657f53bc155b474c5d46884dd Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 17 Feb 2018 23:29:34 +0100 Subject: Core/Misc: Add PERFORMANCE_PROFILING CMake option Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance. This option is unsupported, do not report any issue happening when enabling this option. --- src/common/Debugging/Errors.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/Debugging/Errors.h') diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 867040ed829..ecb8284e9da 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -52,7 +52,12 @@ namespace Trinity #define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END #define WPAbort() ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END +#ifdef PERFORMANCE_PROFILING +#define ASSERT(cond, ...) ((void)0) +#else #define ASSERT WPAssert +#endif + #define ABORT WPAbort template inline T* ASSERT_NOTNULL(T* pointer) -- cgit v1.2.3