diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-04 16:35:26 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-13 23:00:17 +0100 |
commit | 30d2de9aa82196a12f47930e736181c48c568585 (patch) | |
tree | f3d0d2a979e6cf37db06a69e8bfb839fced9d5d7 /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | 4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34 (diff) | |
download | cmake-30d2de9aa82196a12f47930e736181c48c568585.tar.gz |
cmGeneratorExpressionEvaluator: Replace own algorithm with cmDeleteAll.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 2f17915d6b..22b61bae3d 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*> >); } |