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

This commit is contained in:
FutureRave 2022-11-26 15:22:36 +00:00
parent eefcf29e29
commit 6bc46e6ad1

View File

@ -72,7 +72,7 @@ namespace utils
void* memory::allocate(const size_t length)
{
return calloc(length, 1);
return std::calloc(length, 1);
}
char* memory::duplicate_string(const std::string& string)
@ -84,10 +84,7 @@ namespace utils
void memory::free(void* data)
{
if (data)
{
::free(data);
}
std::free(data);
}
void memory::free(const void* data)