Mercurial > audlegacy-plugins
comparison src/console/blargg_common.h @ 341:986f098da058 trunk
[svn] - merge in blargg's changes
author | nenolod |
---|---|
date | Thu, 07 Dec 2006 15:20:41 -0800 |
parents | fb513e10174e |
children |
comparison
equal
deleted
inserted
replaced
340:9e5a7158fa80 | 341:986f098da058 |
---|---|
52 return begin_ [n]; | 52 return begin_ [n]; |
53 } | 53 } |
54 }; | 54 }; |
55 | 55 |
56 #ifndef BLARGG_DISABLE_NOTHROW | 56 #ifndef BLARGG_DISABLE_NOTHROW |
57 #if __cplusplus < 199711 | |
58 #define BLARGG_THROWS( spec ) | |
59 #else | |
60 #define BLARGG_THROWS( spec ) throw spec | |
61 #endif | |
57 #define BLARGG_DISABLE_NOTHROW \ | 62 #define BLARGG_DISABLE_NOTHROW \ |
58 void* operator new ( size_t s ) { return malloc( s ); }\ | 63 void* operator new ( size_t s ) BLARGG_THROWS(()) { return malloc( s ); }\ |
59 void operator delete ( void* p ) { free( p ); } | 64 void operator delete ( void* p ) { free( p ); } |
60 #define BLARGG_NEW new | 65 #define BLARGG_NEW new |
61 #else | 66 #else |
62 #include <new> | 67 #include <new> |
63 #define BLARGG_NEW new (std::nothrow) | 68 #define BLARGG_NEW new (std::nothrow) |