mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Get rid of DEL() and FREE() macros.
Part of CoreLibExe must die.
This commit is contained in:
@ -166,7 +166,7 @@ CLockWaitSetAllocator::CLockWaitSetAllocator (CLockWaitSetAllocator * prev) {
|
||||
|
||||
//===========================================================================
|
||||
CLockWaitSetAllocator::~CLockWaitSetAllocator () {
|
||||
DEL(m_prev);
|
||||
delete m_prev;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@ -207,7 +207,7 @@ void CLockWaitSetAllocator::Shutdown () {
|
||||
// Free all allocators
|
||||
while (s_allocator) {
|
||||
CLockWaitSetAllocator * prev = s_allocator->m_prev;
|
||||
DEL(s_allocator);
|
||||
delete s_allocator;
|
||||
s_allocator = prev;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ struct CmdArgData {
|
||||
|
||||
~CmdArgData () {
|
||||
if (buffer)
|
||||
FREE(buffer);
|
||||
free(buffer);
|
||||
}
|
||||
};
|
||||
|
||||
@ -218,7 +218,7 @@ void CICmdParser::Error (const CmdTokState * state, ECmdError errorCode, const w
|
||||
state->parser->OnError(buffer, errorCode, arg, value);
|
||||
|
||||
// Free memory
|
||||
FREE(buffer);
|
||||
free(buffer);
|
||||
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ bool CICmdParser::ProcessValue (CmdTokState * state, unsigned index, const wchar
|
||||
|
||||
case kCmdTypeString:
|
||||
if (arg.buffer)
|
||||
FREE(arg.buffer);
|
||||
free(arg.buffer);
|
||||
arg.buffer = StrDup(str);
|
||||
arg.val.strVal = arg.buffer;
|
||||
break;
|
||||
@ -539,7 +539,7 @@ CCmdParser::CCmdParser (const CmdArgDef def[], unsigned defCount) {
|
||||
|
||||
//===========================================================================
|
||||
CCmdParser::~CCmdParser () {
|
||||
DEL(fParser);
|
||||
delete fParser;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -254,8 +254,8 @@ void CryptKeyClose (
|
||||
if (!key)
|
||||
return;
|
||||
|
||||
DEL(key->handle);
|
||||
DEL(key);
|
||||
delete key->handle;
|
||||
delete key;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -341,7 +341,7 @@ void TBaseHashTable<T>::Clear () {
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
void TBaseHashTable<T>::Delete (T * object) {
|
||||
DEL(object);
|
||||
delete object;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@ -555,7 +555,7 @@ template<class T, class K>
|
||||
T * THashTable<T,K>::Unduplicate (T * object, const K & key) {
|
||||
T * existing = Find(key);
|
||||
if (existing) {
|
||||
DEL(object);
|
||||
delete object;
|
||||
return existing;
|
||||
}
|
||||
else {
|
||||
@ -730,7 +730,7 @@ public:
|
||||
}
|
||||
void SetString (const C str[]) { // deprecated
|
||||
if (this->m_str)
|
||||
FREE(const_cast<C *>(this->m_str));
|
||||
free(const_cast<C *>(this->m_str));
|
||||
if (str)
|
||||
this->m_str = StrDup(str);
|
||||
else
|
||||
|
@ -485,7 +485,7 @@ void TList<T>::Clear () {
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
void TList<T>::Delete (T * node) {
|
||||
DEL(node);
|
||||
delete node;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -143,7 +143,7 @@ inline void TPriorityQueue<C,P>::Clear () {
|
||||
// Deleting an object could cause other objects in the queue to be deleted
|
||||
// so we can't make any assumptions about indices or counts of items in the array
|
||||
while (C * head = Dequeue())
|
||||
DEL(head);
|
||||
delete head;
|
||||
|
||||
m_array.Clear();
|
||||
}
|
||||
@ -164,7 +164,7 @@ C * TPriorityQueue<C,P>::Delete (C * object) {
|
||||
unsigned index = priority->GetIndex();
|
||||
|
||||
// delete the object
|
||||
DEL(object);
|
||||
delete object;
|
||||
|
||||
// return the next object in that queue
|
||||
if (queue && (index < queue->Count()))
|
||||
|
@ -168,7 +168,7 @@ public:
|
||||
}
|
||||
|
||||
inline virtual void OnZeroRef () {
|
||||
DEL(this);
|
||||
delete this;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -175,7 +175,7 @@ typename TSkipList<T,K,keyOffset,Cmp>::Node* TSkipList<T,K,keyOffset,Cmp>::Alloc
|
||||
template<class T, class K, unsigned keyOffset, class Cmp>
|
||||
void TSkipList<T,K,keyOffset,Cmp>::FreeNode (TNode<T,K> * node) {
|
||||
|
||||
FREE(node);
|
||||
free(node);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -243,7 +243,7 @@ void TSkipList<T,K,keyOffset,Cmp>::Clear () {
|
||||
Node * ptr = m_head->next[0];
|
||||
while (ptr != m_stop) {
|
||||
Node * next = ptr->next[0];
|
||||
DEL(ptr->object);
|
||||
delete ptr->object;
|
||||
FreeNode(ptr);
|
||||
ptr = next;
|
||||
}
|
||||
@ -259,7 +259,7 @@ template<class T, class K, unsigned keyOffset, class Cmp>
|
||||
void TSkipList<T,K,keyOffset,Cmp>::Delete (T * object) {
|
||||
|
||||
Unlink(object);
|
||||
DEL(object);
|
||||
delete object;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -159,7 +159,7 @@ void CBaseSpareList::CleanUp (const char typeName[]) {
|
||||
// walk chain of AllocNodes and free each of them
|
||||
while (m_allocHead) {
|
||||
AllocNode * allocNext = m_allocHead->allocNext;
|
||||
FREE(m_allocHead);
|
||||
free(m_allocHead);
|
||||
m_allocHead = allocNext;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ struct SubstParsedData {
|
||||
}
|
||||
|
||||
~SubstBlock() {
|
||||
FREE(data);
|
||||
free(data);
|
||||
}
|
||||
};
|
||||
|
||||
@ -74,7 +74,7 @@ struct SubstParsedData {
|
||||
~SubstParsedData() {
|
||||
for (unsigned i = 0; i < blocks.Count(); ++i) {
|
||||
SubstBlock<chartype> * block = blocks[i];
|
||||
DEL(block);
|
||||
delete block;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user