diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2019-02-07 21:39:05 (GMT) |
---|---|---|
committer | Artur Ryt <artur.ryt@gmail.com> | 2019-02-07 21:39:05 (GMT) |
commit | 01b2d6ab7465e7f22fb821876027df86b0c8f363 (patch) | |
tree | 7ae313670e3655269ef7f9db6feabdc4bb2aaf25 /Source/cmInstallExportAndroidMKGenerator.cxx | |
parent | 15bdbec0176e3aa620bb5bda3631819c5ca18eaf (diff) | |
download | CMake-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/cmInstallExportAndroidMKGenerator.cxx')
-rw-r--r-- | Source/cmInstallExportAndroidMKGenerator.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmInstallExportAndroidMKGenerator.cxx b/Source/cmInstallExportAndroidMKGenerator.cxx index 85b7021..186b9df 100644 --- a/Source/cmInstallExportAndroidMKGenerator.cxx +++ b/Source/cmInstallExportAndroidMKGenerator.cxx @@ -67,10 +67,8 @@ void cmInstallExportAndroidMKGenerator::GenerateScript(std::ostream& os) this->EFGen->AddConfiguration(""); } } else { - for (std::vector<std::string>::const_iterator ci = - this->ConfigurationTypes->begin(); - ci != this->ConfigurationTypes->end(); ++ci) { - this->EFGen->AddConfiguration(*ci); + for (std::string const& config : this->ConfigurationTypes) { + this->EFGen->AddConfiguration(config); } } this->EFGen->GenerateImportFile(); @@ -88,11 +86,9 @@ void cmInstallExportAndroidMKGenerator::GenerateScriptConfigs( // Now create a configuration-specific install rule for the import // file of each configuration. std::vector<std::string> files; - for (std::map<std::string, std::string>::const_iterator i = - this->EFGen->GetConfigImportFiles().begin(); - i != this->EFGen->GetConfigImportFiles().end(); ++i) { - files.push_back(i->second); - std::string config_test = this->CreateConfigTest(i->first); + for (auto const& pair : this->EFGen->GetConfigImportFiles()) { + files.push_back(pair.second); + std::string config_test = this->CreateConfigTest(pair.first); os << indent << "if(" << config_test << ")\n"; this->AddInstallRule(os, this->Destination, cmInstallType_FILES, files, false, this->FilePermissions.c_str(), nullptr, |