summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-04 15:35:26 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-13 22:00:17 (GMT)
commit30d2de9aa82196a12f47930e736181c48c568585 (patch)
treef3d0d2a979e6cf37db06a69e8bfb839fced9d5d7 /Source/cmGeneratorExpressionEvaluator.cxx
parent4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34 (diff)
downloadCMake-30d2de9aa82196a12f47930e736181c48c568585.zip
CMake-30d2de9aa82196a12f47930e736181c48c568585.tar.gz
CMake-30d2de9aa82196a12f47930e736181c48c568585.tar.bz2
cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx27
1 files changed, 3 insertions, 24 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 2f17915..22b61ba 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -2045,30 +2045,9 @@ std::string GeneratorExpressionContent::EvaluateParameters(
}
//----------------------------------------------------------------------------
-static void deleteAll(const std::vector<cmGeneratorExpressionEvaluator*> &c)
-{
- std::vector<cmGeneratorExpressionEvaluator*>::const_iterator it
- = c.begin();
- const std::vector<cmGeneratorExpressionEvaluator*>::const_iterator end
- = c.end();
- for ( ; it != end; ++it)
- {
- delete *it;
- }
-}
-
-//----------------------------------------------------------------------------
GeneratorExpressionContent::~GeneratorExpressionContent()
{
- deleteAll(this->IdentifierChildren);
-
- typedef std::vector<cmGeneratorExpressionEvaluator*> EvaluatorVector;
- std::vector<EvaluatorVector>::const_iterator pit =
- this->ParamChildren.begin();
- const std::vector<EvaluatorVector>::const_iterator pend =
- this->ParamChildren.end();
- for ( ; pit != pend; ++pit)
- {
- deleteAll(*pit);
- }
+ cmDeleteAll(this->IdentifierChildren);
+ std::for_each(this->ParamChildren.begin(), this->ParamChildren.end(),
+ cmDeleteAll<std::vector<cmGeneratorExpressionEvaluator*> >);
}