Przeglądaj źródła

Merge pull request #1823 from louis-mclaughlin/mem-leak-compile-fix

Compile fix for linux for GP_USE_MEM_LEAK_DETECTION=1
Sean Taylor 10 lat temu
rodzic
commit
29ab532e11
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      gameplay/src/DebugNew.h

+ 2 - 0
gameplay/src/DebugNew.h

@@ -20,8 +20,10 @@ extern void printMemoryLeaks();
 #endif
 #endif
 void* operator new (std::size_t size, const char* file, int line);
 void* operator new (std::size_t size, const char* file, int line);
 void* operator new[] (std::size_t size, const char* file, int line);
 void* operator new[] (std::size_t size, const char* file, int line);
+#ifdef WIN32
 void* operator new (std::size_t size) throw(std::bad_alloc);
 void* operator new (std::size_t size) throw(std::bad_alloc);
 void* operator new[] (std::size_t size) throw(std::bad_alloc);
 void* operator new[] (std::size_t size) throw(std::bad_alloc);
+#endif
 void* operator new (std::size_t size, const std::nothrow_t&) throw();
 void* operator new (std::size_t size, const std::nothrow_t&) throw();
 void* operator new[] (std::size_t size, const std::nothrow_t&) throw();
 void* operator new[] (std::size_t size, const std::nothrow_t&) throw();
 void operator delete (void* p) throw();
 void operator delete (void* p) throw();