From d883f33c5bc002a8b1e902bed9e2c0e36084adf0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 16 Nov 2017 11:04:40 +1100 Subject: [PATCH] Remove "throw" exception specifications because they are deprecated. The use of such specifications are deprecated since C++11. --- inc/core/MicroBitHeapAllocator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/core/MicroBitHeapAllocator.h b/inc/core/MicroBitHeapAllocator.h index 7b92936..0f0dfb5 100644 --- a/inc/core/MicroBitHeapAllocator.h +++ b/inc/core/MicroBitHeapAllocator.h @@ -136,7 +136,7 @@ inline void native_free(void *p) /** * Overrides the 'new' operator globally, and redirects calls to the micro:bit heap allocator. */ -inline void* operator new(size_t size) throw(std::bad_alloc) +inline void* operator new(size_t size) { return microbit_malloc(size); } @@ -144,7 +144,7 @@ inline void* operator new(size_t size) throw(std::bad_alloc) /** * Overrides the 'new' operator globally, and redirects calls to the micro:bit theap allocator. */ -inline void* operator new[](size_t size) throw(std::bad_alloc) +inline void* operator new[](size_t size) { return microbit_malloc(size); } @@ -152,7 +152,7 @@ inline void* operator new[](size_t size) throw(std::bad_alloc) /** * Overrides the 'delete' operator globally, and redirects calls to the micro:bit theap allocator. */ -inline void operator delete(void *ptr) throw() +inline void operator delete(void *ptr) { microbit_free(ptr); }