//================================================================================================= void QuestManager::Reset() { force = Q_FORCE_DISABLED; DeleteElements(quests); DeleteElements(unaccepted_quests); DeleteElements(quest_item_requests); quests_timeout.clear(); quests_timeout2.clear(); quest_counter = 0; unique_quests_completed = 0; unique_completed_show = false; quest_rumor_counter = P_MAX; for(int i = 0; i < P_MAX; ++i) quest_rumor[i] = false; }
void SPARSE_BIT_Array_2D :: SetSize (int ah, int aw) { DeleteElements(); if (lines) { delete lines; lines = NULL; } if (!aw) aw = ah; height = ah; width = aw; if (!ah) return; lines = new linestruct[ah]; if (lines) { for (int i = 0; i < ah; i++) { lines[i].size = 0; lines[i].maxsize = 0; lines[i].col = NULL; } } else { height = width = 0; MyError ("SPARSE_Array::SetSize: Out of memory"); } }
void CCfgFile::Destroy() {_STTEX(); // For each group while ( m_pHead != NULL ) { LPCFGGROUPINFO next = m_pHead->pNext; // Delete all elements DeleteElements( m_pHead ); // For good measure m_pHead->tail = NULL; m_pHead->size = 0; // Delete this element delete m_pHead; m_pHead = next; } // end while m_pTail = NULL; m_dwSize = 0; m_dwErrors = 0; m_hCurGroup = NULL; *m_szFileName = 0; }
void PreLogger::Apply(Logger* logger) { assert(logger); for(vector<Prelog*>::iterator it = prelogs.begin(), end = prelogs.end(); it != end; ++it) logger->Log((*it)->str.c_str(), (*it)->level, (*it)->time); DeleteElements(prelogs); }
void PreLogger::Apply(Logger* logger) { assert(logger); for(Prelog* log : prelogs) logger->Log(log->level, log->str.c_str(), log->time); if(flush) logger->Flush(); DeleteElements(prelogs); }
BOOL CCfgFile::RemoveGroup(HGROUP node) {_STTEX(); // Find the NULL group if ( node == NULL ) { node = VerifyGroup( NULL ); if ( node == NULL ) return FALSE; } // end if // Remove this node from the list if ( node->pPrev != NULL ) node->pPrev->pNext = node->pNext; if ( node->pNext != NULL ) node->pNext->pPrev = node->pPrev; if ( m_pHead == node ) m_pHead = node->pNext; if ( m_pTail == node ) m_pTail = node->pPrev; // Delete this node DeleteElements( node ); delete node; // Decrement the count if ( m_dwSize ) m_dwSize--; return TRUE; }
//================================================================================================= ListBox::~ListBox() { DeleteElements(items); StringPool.Free(texts); delete menu; }
//============================================================================= void CleanGame() { delete inn; DeleteElements(units); }
SPARSE_BIT_Array_2D :: ~SPARSE_BIT_Array_2D () { DeleteElements (); delete lines; }
GeneratorBMRC::~GeneratorBMRC() { DeleteElements(); }
void PreLogger::Clear() { DeleteElements(prelogs); }
MultiLogger::~MultiLogger() { DeleteElements(loggers); }
//================================================================================================= void QuestManager::Cleanup() { DeleteElements(quests); DeleteElements(unaccepted_quests); DeleteElements(quest_item_requests); }
//================================================================================================= City::~City() { DeleteElements(inside_buildings); }
CNcbiResource::~CNcbiResource( void ) { DeleteElements( m_cmd ); }