From e731e117020de785bced16789642b2ef6a54a899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 8 Sep 2003 02:33:37 +0000 Subject: [PATCH] Added the nothrow variants of the new operator. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4549 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/util/kernel_cpp.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/headers/private/kernel/util/kernel_cpp.h b/headers/private/kernel/util/kernel_cpp.h index 3cd9f293b5..d94a9944a7 100644 --- a/headers/private/kernel/util/kernel_cpp.h +++ b/headers/private/kernel/util/kernel_cpp.h @@ -39,6 +39,20 @@ operator new[](size_t size) throw (std::bad_alloc) } +inline void * +operator new(size_t size, const std::nothrow_t &) throw () +{ + return malloc(size); +} + + +inline void * +operator new[](size_t size, const std::nothrow_t &) throw () +{ + return malloc(size); +} + + inline void operator delete(void *ptr) throw () {