mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- make m_alloc optional for tarray and memarena
This commit is contained in:
parent
410c35b942
commit
673f06c05f
2 changed files with 20 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue