summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorArtur Ryt <artur.ryt@gmail.com>2019-02-07 21:39:05 (GMT)
committerArtur Ryt <artur.ryt@gmail.com>2019-02-07 21:39:05 (GMT)
commit01b2d6ab7465e7f22fb821876027df86b0c8f363 (patch)
tree7ae313670e3655269ef7f9db6feabdc4bb2aaf25 /Source/cmGeneratorExpressionNode.cxx
parent15bdbec0176e3aa620bb5bda3631819c5ca18eaf (diff)
downloadCMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.zip
CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.tar.gz
CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.tar.bz2
Modernize: Use ranged for-loops when possible
Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index e8cb151..dcec0a4 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -103,13 +103,11 @@ static const struct ZeroNode installInterfaceNode;
const GeneratorExpressionContent* content, \
cmGeneratorExpressionDAGChecker*) const \
{ \
- std::vector<std::string>::const_iterator it = parameters.begin(); \
- const std::vector<std::string>::const_iterator end = parameters.end(); \
- for (; it != end; ++it) { \
- if (*it == #FAILURE_VALUE) { \
+ for (std::string const& param : parameters) { \
+ if (param == #FAILURE_VALUE) { \
return #FAILURE_VALUE; \
} \
- if (*it != #SUCCESS_VALUE) { \
+ if (param != #SUCCESS_VALUE) { \
reportError(context, content->GetOriginalExpression(), \
"Parameters to $<" #OP \
"> must resolve to either '0' or '1'."); \