From 0d8b746ea9322b6140570a88a511b06aad818ff6 Mon Sep 17 00:00:00 2001 From: ebensza Date: Thu, 28 Apr 2016 10:18:15 +0200 Subject: [PATCH] correcting error when compiling with clang Signed-off-by: ebensza --- common/new.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/new.cc b/common/new.cc index ed12449..1b1c43a 100644 --- a/common/new.cc +++ b/common/new.cc @@ -13,17 +13,18 @@ ******************************************************************************/ #include "dbgnew.hh" #include +#include #undef new static void *dummy = NULL; -void *operator new(size_t size) throw () +void *operator new(size_t size) throw (std::bad_alloc) { return Malloc(size); } -void *operator new[](size_t size) throw () +void *operator new[](size_t size) throw (std::bad_alloc) { if (size == 0) return &dummy; else return Malloc(size); -- 2.34.1