summaryrefslogtreecommitdiffstats
path: root/src/AllocationPool.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-26 10:41:55 +0100
committerGitHub <noreply@github.com>2021-01-26 10:41:55 +0100
commit50a94f972d26ee15fc22cce657d13023d1022905 (patch)
tree24417c741cf85061b73098a32e61ecd3749be05e /src/AllocationPool.h
parentRedstone: inline -> static (diff)
downloadcuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.gz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.bz2
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.lz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.xz
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.tar.zst
cuberite-50a94f972d26ee15fc22cce657d13023d1022905.zip
Diffstat (limited to '')
-rw-r--r--src/AllocationPool.h8
1 files changed, 4 insertions, 4 deletions
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