mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
- some safety net.
This commit is contained in:
parent
c122aa2178
commit
1c3487444c
1 changed files with 4 additions and 1 deletions
|
@ -918,7 +918,7 @@ static FORCE_INLINE void *Baligned_alloc(const size_t alignment, const size_t si
|
||||||
#if defined _WIN32 && !defined NO_ALIGNED_MALLOC
|
#if defined _WIN32 && !defined NO_ALIGNED_MALLOC
|
||||||
# define Baligned_free _aligned_free
|
# define Baligned_free _aligned_free
|
||||||
#else
|
#else
|
||||||
# define Baligned_free Xfree
|
# define Baligned_free xfree()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1305,6 +1305,9 @@ static FORCE_INLINE void *xrealloc(void * const ptr, const bsize_t size)
|
||||||
return (EDUKE32_PREDICT_TRUE(newptr != NULL || size == 0)) ? newptr: handle_memerr(ptr);
|
return (EDUKE32_PREDICT_TRUE(newptr != NULL || size == 0)) ? newptr: handle_memerr(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This will throw up when BFee is no longer usable, I do not want to change all code right now that uses it to make future merges easier.
|
||||||
|
static_assert(Bfree == free, "BFree must be free");
|
||||||
|
|
||||||
static FORCE_INLINE void xfree(void *const ptr) { Bfree(ptr); }
|
static FORCE_INLINE void xfree(void *const ptr) { Bfree(ptr); }
|
||||||
|
|
||||||
static FORCE_INLINE void xaligned_free(void *const ptr) { Baligned_free(ptr); }
|
static FORCE_INLINE void xaligned_free(void *const ptr) { Baligned_free(ptr); }
|
||||||
|
|
Loading…
Reference in a new issue