mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-09 01:01:05 +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 "basics.h"
|
||||||
#include "memarena.h"
|
#include "memarena.h"
|
||||||
#include "cmdlib.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
|
struct FMemArena::Block
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,13 @@
|
||||||
#include <stdint.h> // for mingw
|
#include <stdint.h> // for mingw
|
||||||
#endif
|
#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
|
template<typename T> class TIterator
|
||||||
{
|
{
|
||||||
|
@ -1925,3 +1931,8 @@ private:
|
||||||
unsigned int Count;
|
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