diff --git a/src/C4Include.h b/src/C4Include.h index d7c799daf..a616b39d2 100644 --- a/src/C4Include.h +++ b/src/C4Include.h @@ -66,23 +66,6 @@ don't need to include this file or any of the files it includes. */ #include namespace re = std; -// debug memory management - must come after standard headers, -// because those libraries use placement new -#ifndef NODEBUGMEM -#if defined(_DEBUG) && defined(_MSC_VER) -#define _CRTDBG_MAP_ALLOC -#include -#include -inline void *operator new(size_t s, const char *szFile, long iLine) -{ return ::operator new(s, _NORMAL_BLOCK, szFile, iLine); } -inline void operator delete(void *p, const char *, long) -{ ::operator delete(p); } -#define new_orig new -#define new new(__FILE__, __LINE__) -#endif -#endif -#include - #include "lib/Standard.h" #include "C4Prototypes.h" #include "lib/C4Real.h" diff --git a/src/landscape/C4Particles.h b/src/landscape/C4Particles.h index c2efa7b4e..ddbc0aa74 100644 --- a/src/landscape/C4Particles.h +++ b/src/landscape/C4Particles.h @@ -18,10 +18,7 @@ #include "platform/StdScheduler.h" -#pragma push_macro("new") -#undef new #include -#pragma pop_macro("new") #ifndef INC_C4Particles #define INC_C4Particles diff --git a/src/lib/C4Random.cpp b/src/lib/C4Random.cpp index ee67aa253..54f89f0de 100644 --- a/src/lib/C4Random.cpp +++ b/src/lib/C4Random.cpp @@ -23,10 +23,7 @@ #include -#pragma push_macro("new") -#undef new #include -#pragma pop_macro("new") int RandomCount = 0; diff --git a/src/lib/Standard.h b/src/lib/Standard.h index 9b4acf7e7..01e533988 100644 --- a/src/lib/Standard.h +++ b/src/lib/Standard.h @@ -21,8 +21,6 @@ #define INC_STANDARD #include -#pragma push_macro("new") -#undef new // The Clear/Default functions that exist on most OpenClonk classes are A // BAD IDEA because the caller has no guarantee that every member has been @@ -39,7 +37,6 @@ inline InplaceReconstruct(T *obj) obj->~T(); new (obj) T(); } -#pragma pop_macro("new") #include "platform/PlatformAbstraction.h"