From 094675bd42e4755669ff2105c83929f8664e57cc Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 17 Feb 2021 12:37:19 -0500 Subject: [PATCH] Remove wx/any.h from MemoryX.h; sacrifice MSVC debug new macro ... ... it never helped us debug much, and polluted the preprocessor namespace and made this bad depencency --- src/MemoryX.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/MemoryX.h b/src/MemoryX.h index 0a274cd85..da299a1bc 100644 --- a/src/MemoryX.h +++ b/src/MemoryX.h @@ -138,17 +138,6 @@ public: with *, ->, reset(), or in if() */ -// Placement-NEW is used below, and that does not cooperate with the DEBUG_NEW for Visual Studio -#ifdef _DEBUG -#ifdef _MSC_VER -#undef new - -// wx/any.h also uses Placement-NEW so include it before redefining "new" at comment: -// "Restore definition of debug new" -#include -#endif -#endif - template class Optional { public: @@ -265,15 +254,6 @@ private: X* pp{ nullptr }; }; -// Restore definition of debug new -#ifdef _DEBUG -#ifdef _MSC_VER -#undef THIS_FILE -static const char THIS_FILE[] = __FILE__; -#define new new(_NORMAL_BLOCK, THIS_FILE, __LINE__) -#endif -#endif - /** A deleter for pointers obtained with malloc */