summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-04 12:33:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-13 22:00:17 (GMT)
commit4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34 (patch)
treeb33cf1a4185ae6525c023a2dff210bf3449df197 /Source/cmMakefile.cxx
parentabb4a6781f96b28e4c30014915f566dee9130db7 (diff)
downloadCMake-4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34.zip
CMake-4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34.tar.gz
CMake-4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34.tar.bz2
Use the cmDeleteAll algorithm instead of trivial raw loops.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx46
1 files changed, 7 insertions, 39 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d188331..fdf311f 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -194,45 +194,13 @@ bool cmMakefile::NeedCacheCompatibility(int major, int minor) const
cmMakefile::~cmMakefile()
{
- for(std::vector<cmInstallGenerator*>::iterator
- i = this->InstallGenerators.begin();
- i != this->InstallGenerators.end(); ++i)
- {
- delete *i;
- }
- for(std::vector<cmTestGenerator*>::iterator
- i = this->TestGenerators.begin();
- i != this->TestGenerators.end(); ++i)
- {
- delete *i;
- }
- for(std::vector<cmSourceFile*>::iterator i = this->SourceFiles.begin();
- i != this->SourceFiles.end(); ++i)
- {
- delete *i;
- }
- for(std::map<std::string, cmTest*>::iterator i = this->Tests.begin();
- i != this->Tests.end(); ++i)
- {
- delete i->second;
- }
- for(std::vector<cmTarget*>::iterator
- i = this->ImportedTargetsOwned.begin();
- i != this->ImportedTargetsOwned.end(); ++i)
- {
- delete *i;
- }
- for(unsigned int i=0; i < this->FinalPassCommands.size(); i++)
- {
- delete this->FinalPassCommands[i];
- }
- std::vector<cmFunctionBlocker*>::iterator pos;
- for (pos = this->FunctionBlockers.begin();
- pos != this->FunctionBlockers.end(); ++pos)
- {
- cmFunctionBlocker* b = *pos;
- delete b;
- }
+ cmDeleteAll(this->InstallGenerators);
+ cmDeleteAll(this->TestGenerators);
+ cmDeleteAll(this->SourceFiles);
+ cmDeleteAll(this->Tests);
+ cmDeleteAll(this->ImportedTargetsOwned);
+ cmDeleteAll(this->FinalPassCommands);
+ cmDeleteAll(this->FunctionBlockers);
this->FunctionBlockers.clear();
if (this->PolicyStack.size() != 1)
{