Meta: modernize old-fashioned loops to range-based for.

Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
This commit is contained in:
Pavel Solodovnikov
2017-09-11 13:40:26 +03:00
parent 00975e9261
commit 7d5095796a
133 changed files with 2453 additions and 3589 deletions
+8 -10
View File
@@ -256,11 +256,10 @@ void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule(
// Expand placeholders in the commands.
rulePlaceholderExpander->SetTargetImpLib(targetOutputReal);
for (std::vector<std::string>::iterator i = real_link_commands.begin();
i != real_link_commands.end(); ++i) {
*i = launcher + *i;
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i,
vars);
for (std::string& real_link_command : real_link_commands) {
real_link_command = launcher + real_link_command;
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
real_link_command, vars);
}
// Restore path conversion to normal shells.
@@ -638,11 +637,10 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Expand placeholders in the commands.
rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport);
for (std::vector<std::string>::iterator i = real_link_commands.begin();
i != real_link_commands.end(); ++i) {
*i = launcher + *i;
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i,
vars);
for (std::string& real_link_command : real_link_commands) {
real_link_command = launcher + real_link_command;
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator,
real_link_command, vars);
}
// Restore path conversion to normal shells.