diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-11 10:40:26 (GMT) |
---|---|---|
committer | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-12 13:22:47 (GMT) |
commit | 7d5095796ab616cf9b709036387bb95ab9984141 (patch) | |
tree | c010e922adad95ef86ab4a3ac2a3abd63e9f33ef /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | 00975e926199eea21763470e2ab876246e36669a (diff) | |
download | CMake-7d5095796ab616cf9b709036387bb95ab9984141.zip CMake-7d5095796ab616cf9b709036387bb95ab9984141.tar.gz CMake-7d5095796ab616cf9b709036387bb95ab9984141.tar.bz2 |
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.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index b9b3c2f..e1745bd 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -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. |