clang-tidy: fix modernize-loop-convert lints

This commit is contained in:
Ben Boeckel
2022-11-23 08:31:18 -05:00
parent 362d6cd234
commit 1f893e5873
5 changed files with 21 additions and 26 deletions
+6 -9
View File
@@ -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");
}
}