mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Get rid of REALLOC(), REALLOCFLAGS(), and CALLOC()
This commit is contained in:
@ -167,9 +167,6 @@ inline void CDECL operator delete (void *, void *) {}
|
||||
#define ALLOC(b) MemAlloc(b, 0, __FILE__, __LINE__)
|
||||
#define ALLOCZERO(b) MemAlloc(b, kMemZero, __FILE__, __LINE__)
|
||||
#define ALLOCFLAGS(b, f) MemAlloc(b, (f), __FILE__, __LINE__)
|
||||
#define REALLOC(p, b) MemRealloc(p, b, 0, __FILE__, __LINE__)
|
||||
#define REALLOCFLAGS(p, b, f) MemRealloc(p, b, (f), __FILE__, __LINE__)
|
||||
#define CALLOC(n, s) MemAlloc((n)*(s), kMemZero, __FILE__, __LINE__)
|
||||
#define MEMDUP(s, b) MemDup(s, b, 0, __FILE__, __LINE__)
|
||||
#define ZERO(s) MemSet(&s, 0, sizeof(s))
|
||||
#define ZEROPTR(p) MemSet(p, 0, sizeof(*p))
|
||||
|
@ -245,7 +245,7 @@ void TBuffer<T>::Set (const T * source, unsigned count) {
|
||||
template<class T>
|
||||
void TBuffer<T>::SetBytes (unsigned bytes) {
|
||||
if (bytes)
|
||||
m_data = (T *)REALLOCFLAGS(m_data, bytes, ARR_MEMORY_FLAGS);
|
||||
m_data = (T *)realloc(m_data, bytes);
|
||||
else if (m_data) {
|
||||
free(m_data);
|
||||
m_data = nil;
|
||||
|
Reference in New Issue
Block a user