summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbear496 <70439542+dbear496@users.noreply.github.com>2024-09-14 20:57:52 -0400
committerJohn Wiegley <johnw@newartisans.com>2024-09-16 14:40:23 -0400
commitabd4ecb51e7188dc9762f97ab4c1627ed9704880 (patch)
tree67be4c9b5b71f728c0948ee7664ace84b40bd38e
parent19b0553dfbcd65c3c601b89e7020bff8013cb461 (diff)
downloadfork-ledger-abd4ecb51e7188dc9762f97ab4c1627ed9704880.tar.gz
fork-ledger-abd4ecb51e7188dc9762f97ab4c1627ed9704880.tar.bz2
fork-ledger-abd4ecb51e7188dc9762f97ab4c1627ed9704880.zip
remove exception specifications
-rw-r--r--src/utils.cc38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/utils.cc b/src/utils.cc
index 1cc19ca0..0eb81220 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -229,54 +229,24 @@ static void trace_delete_func(void * ptr, const char * which)
//#if !defined(__has_feature) || !__has_feature(address_sanitizer)
-#ifdef _GLIBCXX_THROW
-void * operator new(std::size_t size) _GLIBCXX_THROW(std::bad_alloc) {
-#else
-void * operator new(std::size_t size) throw (std::bad_alloc) {
-#endif
+void * operator new(std::size_t size) {
void * ptr = std::malloc(size);
if (DO_VERIFY() && ledger::memory_tracing_active)
ledger::trace_new_func(ptr, "new", size);
return ptr;
}
-void * operator new(std::size_t size, const std::nothrow_t&) throw() {
- void * ptr = std::malloc(size);
- if (DO_VERIFY() && ledger::memory_tracing_active)
- ledger::trace_new_func(ptr, "new", size);
- return ptr;
-}
-#ifdef _GLIBCXX_THROW
-void * operator new[](std::size_t size) _GLIBCXX_THROW(std::bad_alloc) {
-#else
-void * operator new[](std::size_t size) throw (std::bad_alloc) {
-#endif
- void * ptr = std::malloc(size);
- if (DO_VERIFY() && ledger::memory_tracing_active)
- ledger::trace_new_func(ptr, "new[]", size);
- return ptr;
-}
-void * operator new[](std::size_t size, const std::nothrow_t&) throw() {
+void * operator new[](std::size_t size) {
void * ptr = std::malloc(size);
if (DO_VERIFY() && ledger::memory_tracing_active)
ledger::trace_new_func(ptr, "new[]", size);
return ptr;
}
-void operator delete(void * ptr) throw() {
+void operator delete(void * ptr) {
if (DO_VERIFY() && ledger::memory_tracing_active)
ledger::trace_delete_func(ptr, "new");
std::free(ptr);
}
-void operator delete(void * ptr, const std::nothrow_t&) throw() {
- if (DO_VERIFY() && ledger::memory_tracing_active)
- ledger::trace_delete_func(ptr, "new");
- std::free(ptr);
-}
-void operator delete[](void * ptr) throw() {
- if (DO_VERIFY() && ledger::memory_tracing_active)
- ledger::trace_delete_func(ptr, "new[]");
- std::free(ptr);
-}
-void operator delete[](void * ptr, const std::nothrow_t&) throw() {
+void operator delete[](void * ptr) {
if (DO_VERIFY() && ledger::memory_tracing_active)
ledger::trace_delete_func(ptr, "new[]");
std::free(ptr);