Remove pointless null check in operator delete

free() checks for NULL, no need to add another check.
pull/5583/head
Kevin Bracey 2017-11-24 10:23:23 +02:00
parent 4e222952d7
commit ff6bc08c53
1 changed files with 2 additions and 6 deletions

View File

@ -1045,15 +1045,11 @@ void *operator new[](std::size_t count, const std::nothrow_t& tag)
void operator delete(void *ptr)
{
if (ptr != NULL) {
free(ptr);
}
free(ptr);
}
void operator delete[](void *ptr)
{
if (ptr != NULL) {
free(ptr);
}
free(ptr);
}
/* @brief standard c library clock() function.