summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-15 14:54:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-15 14:54:04 (GMT)
commit4ecc392b42e999e3e103eac0c0e28fa63c39167c (patch)
treeafc707f7434f8fbf617c2960e7e8f8d90fffc866 /Source/cmMakefile.cxx
parent6418eef222304db9a884a3cf101f86c2eabfb503 (diff)
parent65b81da458614c6a4652ea2e4fc933893c671281 (diff)
downloadCMake-4ecc392b42e999e3e103eac0c0e28fa63c39167c.zip
CMake-4ecc392b42e999e3e103eac0c0e28fa63c39167c.tar.gz
CMake-4ecc392b42e999e3e103eac0c0e28fa63c39167c.tar.bz2
Merge topic 'delete-algorithm'
65b81da4 cmVariableWatch: Use the cmDeleteAll algorithm with for_each. 30d2de9a cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll. 4a6e795b Use the cmDeleteAll algorithm instead of trivial raw loops. abb4a678 Add a generic algorithm for deleting items in a container.
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 b532a38..c96c6da 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)
{