aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-05-14 15:33:27 +0000
committerMax Horn2005-05-14 15:33:27 +0000
commit5286121524b6723ac07fc23212fad0a31ee4706a (patch)
treeca479e4942fc1d60de7c8d39044c1855723dfd24
parenteda6987525e24a9916b7c30c7c43bc0e19b8ea6f (diff)
downloadscummvm-rg350-5286121524b6723ac07fc23212fad0a31ee4706a.tar.gz
scummvm-rg350-5286121524b6723ac07fc23212fad0a31ee4706a.tar.bz2
scummvm-rg350-5286121524b6723ac07fc23212fad0a31ee4706a.zip
Removing the last traces of the old custom new/delete operators
svn-id: r18094
-rw-r--r--base/main.cpp24
-rw-r--r--common/scummsys.h17
2 files changed, 0 insertions, 41 deletions
diff --git a/base/main.cpp b/base/main.cpp
index df3f234eff..ed364da20f 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -506,27 +506,3 @@ void CDECL debug(const char *s, ...) {
debugHelper(buf);
}
-
-/*
-#if !defined(__PALM_OS__) && !defined(_WIN32_WCE)
-void *operator new(size_t size) {
- return memset(malloc(size), 0xE7, size);
-}
-
-void operator delete(void *ptr) {
- free(ptr);
-}
-
-#undef free
-void free_check(void *ptr) {
- if ((unsigned long)ptr == 0xE7E7E7E7UL) {
- printf("ERROR: freeing 0xE7E7E7E7\n");
- exit(1);
- }
- if ((unsigned long)ptr & 1) {
- warning("Freeing odd address 0x%x", ptr);
- }
- free(ptr);
-}
-#endif
-*/
diff --git a/common/scummsys.h b/common/scummsys.h
index 58b01b3902..8617624fb5 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -512,21 +512,4 @@ FORCEINLINE uint32 READ_BE_UINT24(const void *ptr) {
#define STRINGBUFLEN 1024
#endif
-/*
-#if !defined(__PALM_OS__)
- // Initialized operator new
- void * operator new(size_t size);
- void operator delete(void *ptr);
-
- // Temporary hack until we fully remove the new/delete operators:
- // Since 'new' now returns a memory block inited to 0xE7E7E7E7 we might
- // get some invocations of free() with that param. We check for those here.
- // That allows us to set a debugger breakpoint to catch it.
- #ifndef _WIN32_WCE
- #define free(x) free_check(x)
- void free_check(void *ptr);
- #endif
-#endif
-*/
-
#endif