From 50a94f972d26ee15fc22cce657d13023d1022905 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 26 Jan 2021 09:41:55 +0000 Subject: Fix debug macro situation (#5114) Use the standard NDEBUG. --- src/AllocationPool.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/AllocationPool.h') diff --git a/src/AllocationPool.h b/src/AllocationPool.h index 78bb87eee..0af56ce2f 100644 --- a/src/AllocationPool.h +++ b/src/AllocationPool.h @@ -100,7 +100,7 @@ public: void * space = malloc(sizeof(T)); if (space != nullptr) { - #if defined(_MSC_VER) && defined(_DEBUG) + #if defined(_MSC_VER) && !defined(NDEBUG) // The debugging-new that is set up using macros in Globals.h doesn't support the placement-new syntax used here. // Temporarily disable the macro #pragma push_macro("new") @@ -109,7 +109,7 @@ public: return new(space) T; - #if defined(_MSC_VER) && defined(_DEBUG) + #if defined(_MSC_VER) && !defined(NDEBUG) // Re-enable the debugging-new macro #pragma pop_macro("new") #endif @@ -127,7 +127,7 @@ public: } // placement new, used to initalize the object - #if defined(_MSC_VER) && defined(_DEBUG) + #if defined(_MSC_VER) && !defined(NDEBUG) // The debugging-new that is set up using macros in Globals.h doesn't support the placement-new syntax used here. // Temporarily disable the macro #pragma push_macro("new") @@ -136,7 +136,7 @@ public: T * ret = new (m_FreeList.front()) T; - #if defined(_MSC_VER) && defined(_DEBUG) + #if defined(_MSC_VER) && !defined(NDEBUG) // Re-enable the debugging-new macro #pragma pop_macro("new") #endif -- cgit v1.2.3