Disable overloading of built-in new by default

This commit is contained in:
3UR
2025-02-11 04:42:35 +10:00
parent 732d547cf8
commit 1f2ca0fd00
2 changed files with 18 additions and 13 deletions
+4 -2
View File
@@ -150,6 +150,7 @@ inline void* AllocateThis( GameMemoryAllocator allocator, size_t size )
return pMemory;
}
#ifdef SRR_OVERLOAD_BUILTIN_NEW
//==============================================================================
// new
//==============================================================================
@@ -194,6 +195,7 @@ throw( std::bad_alloc )
return( pMemory );
}
#endif
//==============================================================================
@@ -207,14 +209,14 @@ throw( std::bad_alloc )
// Return:
//
//==============================================================================
void operator delete( void* pMemory )
void operator delete(void* pMemory)
#ifdef RAD_PS2
#ifndef RAD_MW
throw()
#endif
#endif
{
radMemoryFree( pMemory );
radMemoryFree(pMemory);
}
+14 -11
View File
@@ -46,6 +46,7 @@ extern bool gMemorySystemInitialized;
#ifdef SRR_OVERLOAD_BUILTIN_NEW
//
// Override built-in new.
@@ -58,17 +59,6 @@ throw( std::bad_alloc )
#endif
;
//
// Override built-in delete.
//
void operator delete( void* pMemory )
#ifdef RAD_PS2
#ifndef RAD_MW
throw()
#endif
#endif
;
//
// Override built-in array new.
//
@@ -80,6 +70,19 @@ throw( std::bad_alloc )
#endif
;
#endif
//
// Override built-in delete.
//
void operator delete(void* pMemory)
#ifdef RAD_PS2
#ifndef RAD_MW
throw()
#endif
#endif
;
//
// Override built-in array delete.
//