mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
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
This commit is contained in:
@@ -138,17 +138,6 @@ public:
|
|||||||
with *, ->, reset(), or in if()
|
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 <wx/any.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<typename X>
|
template<typename X>
|
||||||
class Optional {
|
class Optional {
|
||||||
public:
|
public:
|
||||||
@@ -265,15 +254,6 @@ private:
|
|||||||
X* pp{ nullptr };
|
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
|
A deleter for pointers obtained with malloc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user