refactor(memory): remove nullptr check before std::free

This commit is contained in:
FutureRave 2022-11-25 22:55:05 +00:00
parent 9e22f07200
commit 43f3b3dbdb
No known key found for this signature in database
GPG Key ID: 22F9079C86CFAB31

View File

@ -64,7 +64,7 @@ namespace utils
void* memory::allocate(const size_t length)
{
const auto data = calloc(length, 1);
const auto data = std::calloc(length, 1);
assert(data != nullptr);
return data;
}
@ -78,10 +78,7 @@ namespace utils
void memory::free(void* data)
{
if (data)
{
::free(data);
}
std::free(data);
}
void memory::free(const void* data)