Make compilation process compatible to linux on gcc

This commit is contained in:
Jan
2021-03-03 06:21:25 -08:00
parent 1cd06668e0
commit b4d8e9c17b
23 changed files with 210 additions and 23 deletions

View File

@ -1,5 +1,7 @@
#pragma once
#include <utility>
#define STR(x) #x
#if defined(_MSVC_LANG)

View File

@ -1,5 +1,8 @@
#include "MemoryManager.h"
#include <cstdlib>
#include <cstring>
MemoryManager::AllocationInfo::AllocationInfo(IDestructible* data, void* dataPtr)
{
m_data = data;
@ -34,7 +37,7 @@ void* MemoryManager::Alloc(const size_t size)
char* MemoryManager::Dup(const char* str)
{
char* result = _strdup(str);
char* result = strdup(str);
m_allocations.push_back(result);
return result;
@ -51,4 +54,4 @@ void MemoryManager::Delete(void* data)
return;
}
}
}
}