new(nothrow) is desired by SLList. My definition of nothrow is

a bit sketchy here, but will work for now until I figure out the
proper way to do it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3359 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Tyler Dauwalder 2003-05-27 08:25:15 +00:00
parent c6b0bb0480
commit 968997db5f

View File

@ -10,6 +10,14 @@
#include <new>
#include <stdlib.h>
// I'm not entirely sure if this is such a great idea or not, but
// I can't find the standard definition of nothrow anywhere (in
// order to copy it properly here for kernel use), so this will
// do for the moment so things compile and I can go to bed. :-)
// ToDo: declare and define this thing properly
#ifndef nothrow
# define nothrow 0
#endif
// Oh no! C++ in the kernel! Are you nuts?
//
@ -29,6 +37,13 @@ operator new(size_t size)
}
inline void *
operator new(size_t size, const nothrow_t&) throw()
{
return malloc(size);
}
inline void *
operator new[](size_t size)
{
@ -36,6 +51,13 @@ operator new[](size_t size)
}
inline void *
operator new[](size_t size, const nothrow_t&) throw()
{
return malloc(size);
}
inline void
operator delete(void *ptr)
{