Use _strdup instead of strdup when using msvc

This commit is contained in:
Jan 2021-03-19 16:41:18 +01:00
parent 29e5898c2b
commit ef36d6cdc5

View File

@ -37,7 +37,11 @@ void* MemoryManager::Alloc(const size_t size)
char* MemoryManager::Dup(const char* str)
{
char* result = strdup(str);
#ifdef _MSC_VER
auto* result = _strdup(str);
#else
auto* result = strdup(str);
#endif
m_allocations.push_back(result);
return result;