- make m_alloc optional for tarray and memarena

This commit is contained in:
Christoph Oelckers 2022-01-20 10:25:54 +01:00
parent 410c35b942
commit 673f06c05f
2 changed files with 20 additions and 2 deletions

View file

@ -40,7 +40,14 @@
#include "basics.h"
#include "memarena.h"
#include "cmdlib.h"
#include "m_alloc.h"
#if __has_include("m_alloc.h")
#include "m_alloc.h"
#else
#define M_Malloc malloc
#define M_Realloc realloc
#define M_Free free
#endif
struct FMemArena::Block
{

View file

@ -61,7 +61,13 @@
#include <stdint.h> // for mingw
#endif
#include "m_alloc.h"
#if __has_include("m_alloc.h")
#include "m_alloc.h"
#else
#define M_Malloc malloc
#define M_Realloc realloc
#define M_Free free
#endif
template<typename T> class TIterator
{
@ -1925,3 +1931,8 @@ private:
unsigned int Count;
};
#if !__has_include("m_alloc.h")
#undef M_Malloc
#undef M_Realloc
#undef M_Free
#endif