fixed compilation errors when DEBUG is switched on
[deliverable/titan.core.git] / common / new.cc
index 1b1c43a2d25fc7a474d972451535442fb16bb2d1..fa26100a42f21eabc8797741e48ba4ac1135f108 100644 (file)
@@ -13,7 +13,6 @@
  ******************************************************************************/
 #include "dbgnew.hh"
 #include <stddef.h>
-#include <new>
 
 #undef new
 
@@ -56,6 +55,17 @@ void* operator new[](size_t size, const char* file, int line)
     else return Malloc_dbg(file, line, size);
 }
 
+void* operator new(size_t size, const std::nothrow_t&, const char* file, int line)
+{
+    return Malloc_dbg(file, line, size);
+}
+
+void* operator new[](size_t size, const std::nothrow_t&, const char* file, int line)
+{
+    if (size == 0) return &dummy;
+    else return Malloc_dbg(file, line, size);
+}
+
 int debug_new_counter_t::count = 0; // initial value
 
 #if defined(__CYGWIN__) || defined(INTERIX)
This page took 0.023819 seconds and 5 git commands to generate.