From e2ff797de4b0625e4ed863d34cf56e9c73ba9bf4 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Mon, 3 May 2004 20:00:41 +0000 Subject: [PATCH] changed set_new_handler to std::ser_new_handler --- amxmodx/mmgr/mmgr.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/amxmodx/mmgr/mmgr.cpp b/amxmodx/mmgr/mmgr.cpp index 4fb4a183..9996a18b 100755 --- a/amxmodx/mmgr/mmgr.cpp +++ b/amxmodx/mmgr/mmgr.cpp @@ -638,12 +638,6 @@ void m_setOwner(const char *file, const unsigned int line, const char *func) // memory tracking routines. // --------------------------------------------------------------------------------------------------------------------------------- -// PM: This isn't defined for any reason -new_handler set_new_handler(new_handler x) -{ - return NULL; -} - void *operator new(size_t reportedSize) { #ifdef TEST_MEMORY_MANAGER @@ -672,8 +666,8 @@ void *operator new(size_t reportedSize) // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // set it back again. - new_handler nh = set_new_handler(0); - set_new_handler(nh); + std::new_handler nh = std::set_new_handler(0); + std::set_new_handler(nh); // If there is an error handler, call it @@ -724,8 +718,8 @@ void *operator new[](size_t reportedSize) // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // set it back again. - new_handler nh = set_new_handler(0); - set_new_handler(nh); + std::new_handler nh = std::set_new_handler(0); + std::set_new_handler(nh); // If there is an error handler, call it @@ -782,8 +776,8 @@ void *operator new(size_t reportedSize, const char *sourceFile, int sourceLine) // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // set it back again. - new_handler nh = set_new_handler(0); - set_new_handler(nh); + std::new_handler nh = std::set_new_handler(0); + std::set_new_handler(nh); // If there is an error handler, call it @@ -834,8 +828,8 @@ void *operator new[](size_t reportedSize, const char *sourceFile, int sourceLine // There isn't a way to determine the new handler, except through setting it. So we'll just set it to NULL, then // set it back again. - new_handler nh = set_new_handler(0); - set_new_handler(nh); + std::new_handler nh = std::set_new_handler(0); + std::set_new_handler(nh); // If there is an error handler, call it