summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpression.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-12-30 19:31:53 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2018-12-31 16:50:40 (GMT)
commit1cf9c754db3fcdcd500dbec48e509535135eba1b (patch)
tree232ea9e7f66863fb040b79ce3cb3073baa7298aa /Source/cmGeneratorExpression.cxx
parentae8525b82f03d3ce0c1e880e62bec0956f90839b (diff)
downloadCMake-1cf9c754db3fcdcd500dbec48e509535135eba1b.zip
CMake-1cf9c754db3fcdcd500dbec48e509535135eba1b.tar.gz
CMake-1cf9c754db3fcdcd500dbec48e509535135eba1b.tar.bz2
Source: Modernize for loops, add const modifiers
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 2727d9a..96d4ad6 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -71,16 +71,11 @@ const std::string& cmCompiledGeneratorExpression::EvaluateWithContext(
this->Output.clear();
- std::vector<cmGeneratorExpressionEvaluator*>::const_iterator it =
- this->Evaluators.begin();
- const std::vector<cmGeneratorExpressionEvaluator*>::const_iterator end =
- this->Evaluators.end();
+ for (const cmGeneratorExpressionEvaluator* it : this->Evaluators) {
+ this->Output += it->Evaluate(&context, dagChecker);
- for (; it != end; ++it) {
- this->Output += (*it)->Evaluate(&context, dagChecker);
-
- this->SeenTargetProperties.insert(context.SeenTargetProperties.begin(),
- context.SeenTargetProperties.end());
+ this->SeenTargetProperties.insert(context.SeenTargetProperties.cbegin(),
+ context.SeenTargetProperties.cend());
if (context.HadError) {
this->Output.clear();
break;