summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2020-10-17 23:00:29 (GMT)
committerCengizhan Pasaoglu <cengizhanpasaoglu@gmail.com>2020-10-19 21:04:04 (GMT)
commitbd705788f67741df88bf153825a5943b4b518818 (patch)
tree356596cc5ca5d3f2ad2de7954257903301143bd8 /Source/cmGeneratorExpressionNode.cxx
parentc05e561474c422d23b9f1d29ccb5ceea0037477b (diff)
downloadCMake-bd705788f67741df88bf153825a5943b4b518818.zip
CMake-bd705788f67741df88bf153825a5943b4b518818.tar.gz
CMake-bd705788f67741df88bf153825a5943b4b518818.tar.bz2
Constify some code as suggested by clang-tidy
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 4ca7405..e40316e 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -677,7 +677,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
}
static cmsys::RegularExpression compilerIdValidator("^[A-Za-z0-9_]*$");
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (!compilerIdValidator.find(param)) {
reportError(context, content->GetOriginalExpression(),
@@ -805,7 +805,7 @@ struct PlatformIdNode : public cmGeneratorExpressionNode
return parameters.front().empty() ? "1" : "0";
}
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (param == platformId) {
return "1";
}
@@ -901,7 +901,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
return std::string();
}
context->HadContextSensitiveCondition = true;
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (context->Config.empty()) {
if (param.empty()) {
return "1";
@@ -927,7 +927,7 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode
if (cmProp mapValue = context->CurrentTarget->GetProperty(mapProp)) {
cmExpandList(cmSystemTools::UpperCase(*mapValue), mappedConfigs);
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (cm::contains(mappedConfigs, cmSystemTools::UpperCase(param))) {
return "1";
}
@@ -995,7 +995,7 @@ static const struct CompileLanguageNode : public cmGeneratorExpressionNode
return context->Language;
}
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (context->Language == param) {
return "1";
}
@@ -1101,7 +1101,7 @@ static const struct LinkLanguageNode : public cmGeneratorExpressionNode
return context->Language;
}
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (context->Language == param) {
return "1";
}
@@ -1129,7 +1129,7 @@ struct LinkerId
}
static cmsys::RegularExpression linkerIdValidator("^[A-Za-z0-9_]*$");
- for (auto& param : parameters) {
+ for (auto const& param : parameters) {
if (!linkerIdValidator.find(param)) {
reportError(context, content->GetOriginalExpression(),
"Expression syntax not recognized.");