diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-23 13:31:18 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-11-29 17:39:45 (GMT) |
commit | 1f893e587371cbce2007cae55c118fcf50dca849 (patch) | |
tree | 829c7b8aacad16fe739e0589dbd2f3db1e0e7426 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 362d6cd234dd8e83577bb72dcbe22949aa9253bf (diff) | |
download | CMake-1f893e587371cbce2007cae55c118fcf50dca849.zip CMake-1f893e587371cbce2007cae55c118fcf50dca849.tar.gz CMake-1f893e587371cbce2007cae55c118fcf50dca849.tar.bz2 |
clang-tidy: fix `modernize-loop-convert` lints
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d91723f..87b1301 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -275,8 +275,8 @@ cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator( this->Makefile->GetGeneratorConfigs(cmMakefile::ExcludeEmptyConfig); this->NsightTegra = gg->IsNsightTegra(); this->Android = gg->TargetsAndroid(); - for (int i = 0; i < 4; ++i) { - this->NsightTegraVersion[i] = 0; + for (unsigned int& version : this->NsightTegraVersion) { + version = 0; } sscanf(gg->GetNsightTegraVersion().c_str(), "%u.%u.%u.%u", &this->NsightTegraVersion[0], &this->NsightTegraVersion[1], @@ -2338,19 +2338,16 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource( if (!deployLocation.empty()) { e2.Element("Link", deployLocation + "\\%(FileName)%(Extension)"); } - for (size_t i = 0; i != this->Configurations.size(); ++i) { - if (cge->Evaluate(this->LocalGenerator, this->Configurations[i]) == - "1") { + for (auto& config : this->Configurations) { + if (cge->Evaluate(this->LocalGenerator, config) == "1") { e2.WritePlatformConfigTag("DeploymentContent", "'$(Configuration)|$(Platform)'=='" + - this->Configurations[i] + "|" + - this->Platform + "'", + config + "|" + this->Platform + "'", "true"); } else { e2.WritePlatformConfigTag("ExcludedFromBuild", "'$(Configuration)|$(Platform)'=='" + - this->Configurations[i] + "|" + - this->Platform + "'", + config + "|" + this->Platform + "'", "true"); } } |