Use the cmDeleteAll algorithm instead of trivial raw loops.

This commit is contained in:
Stephen Kelly
2015-01-04 13:33:16 +01:00
parent abb4a6781f
commit 4a6e795b0c
17 changed files with 30 additions and 171 deletions
+2 -11
View File
@@ -69,11 +69,7 @@ cmCursesMainForm::~cmCursesMainForm()
// Clean-up composites
if (this->Entries)
{
std::vector<cmCursesCacheEntryComposite*>::iterator it;
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{
delete *it;
}
cmDeleteAll(*this->Entries);
}
delete this->Entries;
if (this->CMakeInstance)
@@ -188,12 +184,7 @@ void cmCursesMainForm::InitializeUI()
// Clean old entries
if (this->Entries)
{
// Have to call delete on each pointer
std::vector<cmCursesCacheEntryComposite*>::iterator it;
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
{
delete *it;
}
cmDeleteAll(*this->Entries);
}
delete this->Entries;
this->Entries = newEntries;