summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx/MemDebug.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-03 16:51:12 +0200
committerAki <please@ignore.pl>2021-10-03 16:51:12 +0200
commit104248aabf40b692231fccd1adf1a2a494f1589a (patch)
tree5eee42a18a9688b03b483aff5c2bedffb4fe8a6c /FoundationEx/MemDebug.cpp
parentddd76aa4e1571c8d5965709db5c3cd47a89c9a38 (diff)
parentd2f333bf998691760b8970c2784756d0fa81e820 (diff)
downloadstarshatter-104248aabf40b692231fccd1adf1a2a494f1589a.zip
starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.gz
starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.bz2
Stars45 can now be built under MSYS2/Mingw32
Diffstat (limited to 'FoundationEx/MemDebug.cpp')
-rw-r--r--FoundationEx/MemDebug.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/FoundationEx/MemDebug.cpp b/FoundationEx/MemDebug.cpp
index 4f3174f..060df5a 100644
--- a/FoundationEx/MemDebug.cpp
+++ b/FoundationEx/MemDebug.cpp
@@ -89,11 +89,21 @@ void __cdecl operator delete(void* p, const char*, int)
#ifndef _DEBUG
+void* __cdecl operator new[](unsigned int s, const char*, int)
+{
+ return ::operator new[](s);
+}
+
void* __cdecl operator new(unsigned int s, const char*, int)
{
return ::operator new(s);
}
+void __cdecl operator delete[](void* p, const char*, int)
+{
+ ::operator delete[](p);
+}
+
void __cdecl operator delete(void* p, const char*, int)
{
::operator delete(p);
@@ -104,6 +114,11 @@ void __cdecl operator delete(void* p, const char*, int)
// No definitions for the following:
//void* __cdecl operator new(unsigned int, int, const char*, int) {}
+void* __cdecl operator new[](unsigned int s, const char*, int)
+{
+ return ::operator new[](s);
+}
+
void* __cdecl operator new(unsigned int s, const char* f, int l)
{
return ::operator new(s, 1, f, l);
@@ -114,14 +129,19 @@ void* __cdecl operator new(unsigned int s)
return ::operator new(s, 1, __FILE__, __LINE__);
}
+void __cdecl operator delete[](void* p, const char*, int)
+{
+ ::operator delete[](p);
+}
+
void __cdecl operator delete(void* p, const char*, int)
{
::operator delete(p);
}
-#endif _DEBUG
+#endif // _DEBUG
-#endif FOUNDATION_USE_MFC
+#endif // FOUNDATION_USE_MFC
static void heapdump()
{