1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 02:51:27 +00:00

Get rid of ALLOCFLAGS() macro.

This commit is contained in:
Darryl Pogue
2012-01-20 23:20:15 -08:00
committed by Adam Johnson
parent 4159663415
commit 1fa1197c3e
3 changed files with 4 additions and 7 deletions

View File

@ -95,7 +95,7 @@ unsigned CBaseArray::CalcAllocGrowth (unsigned newAlloc, unsigned oldAlloc, unsi
void * CBaseArray::ReallocPtr (void * ptr, unsigned bytes) {
void * newPtr = nil;
if (bytes) {
newPtr = ALLOCFLAGS(bytes, ARR_MEMORY_FLAGS);
newPtr = malloc(bytes);
}
return newPtr;
}

View File

@ -67,8 +67,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define SORTARRAYTYPE(type) TSortArray< type, TArrayCopyBits< type >, type, 0>
#define SORTARRAYTYPEOBJ(type) TSortArray< type, TArrayCopyObject< type >, type, 0>
#define ARR_MEMORY_FLAGS 0 /*| kMemIgnoreBlock*/
/****************************************************************************
*
@ -449,7 +447,7 @@ template<class T, class C>
TFArray<T,C>::TFArray (unsigned count) {
m_alloc = m_count = count;
if (count) {
m_data = (T *)ALLOCFLAGS(count * sizeof(T), ARR_MEMORY_FLAGS);
m_data = (T *)malloc(count * sizeof(T));
C::Construct(m_data, count);
}
else
@ -461,7 +459,7 @@ template<class T, class C>
TFArray<T,C>::TFArray (const T * source, unsigned count) {
m_alloc = m_count = count;
if (count) {
m_data = (T *)ALLOCFLAGS(count * sizeof(T), ARR_MEMORY_FLAGS);
m_data = (T *)malloc(count * sizeof(T));
C::CopyConstruct(m_data, source, count);
}
else
@ -473,7 +471,7 @@ template<class T, class C>
TFArray<T,C>::TFArray (const TFArray<T,C> & source) {
m_alloc = m_count = source.m_count;
if (m_count) {
m_data = (T *)ALLOCFLAGS(m_count * sizeof(T), ARR_MEMORY_FLAGS);
m_data = (T *)malloc(m_count * sizeof(T));
C::CopyConstruct(m_data, source.m_data, m_count);
}
else