diff options
-rw-r--r-- | libstdc++/src/new.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libstdc++/src/new.cpp b/libstdc++/src/new.cpp index 8189159..a9c92d4 100644 --- a/libstdc++/src/new.cpp +++ b/libstdc++/src/new.cpp @@ -23,16 +23,12 @@ void* operator new[](std::size_t size) void operator delete(void* ptr) { - if (ptr) { - free(ptr); - } + free(ptr); } void operator delete[](void* ptr) { - if (ptr) { - free(ptr); - } + free(ptr); } void* operator new(std::size_t size, const std::nothrow_t&) @@ -47,16 +43,12 @@ void* operator new[](std::size_t size, const std::nothrow_t&) void operator delete(void* ptr, const std::nothrow_t&) { - if (ptr) { - free(ptr); - } + free(ptr); } void operator delete[](void* ptr, const std::nothrow_t&) { - if (ptr) { - free(ptr); - } + free(ptr); } |