Removed the "_dontthrow" stuff - "nothrow" is already defined anyway, and

now used instead.
Some style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2829 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-02-24 13:20:15 +00:00
parent ee478c021b
commit 1211df5f90
2 changed files with 16 additions and 10 deletions
+2 -3
View File
@@ -8,9 +8,8 @@
#include "cpp.h" #include "cpp.h"
nothrow_t _dontthrow; extern "C" void
__pure_virtual()
extern "C" void __pure_virtual()
{ {
//printf("pure virtual function call"); //printf("pure virtual function call");
} }
+14 -7
View File
@@ -22,31 +22,38 @@
// - easier to maintain // - easier to maintain
inline void *operator new(size_t size, const nothrow_t&) throw() inline void *
operator new(size_t size, const nothrow_t&) throw()
{ {
return malloc(size); return malloc(size);
} }
inline void *operator new[](size_t size, const nothrow_t&) throw()
inline void *
operator new[](size_t size, const nothrow_t&) throw()
{ {
return malloc(size); return malloc(size);
} }
inline void operator delete(void *ptr)
inline void
operator delete(void *ptr)
{ {
free(ptr); free(ptr);
} }
inline void operator delete[](void *ptr)
inline void
operator delete[](void *ptr)
{ {
free(ptr); free(ptr);
} }
// now we're using virtuals // we're using virtuals
extern "C" void __pure_virtual(); extern "C" void __pure_virtual();
extern nothrow_t _dontthrow; // we are only using the nothrow-version of new
#define new new (_dontthrow) #define new new (nothrow)
#endif /* CPP_H */ #endif /* CPP_H */