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/cmcmd.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/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 0791cb3..91c229c 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1462,24 +1462,23 @@ private: // For visual studio 2005 and newer manifest files need to be embedded into // exe and dll's. This code does that in such a way that incremental linking // still works. -int cmcmd::VisualStudioLink(std::vector<std::string>& args, int type) +int cmcmd::VisualStudioLink(std::vector<std::string> const& args, int type) { if (args.size() < 2) { return -1; } const bool verbose = cmSystemTools::HasEnv("VERBOSE"); std::vector<std::string> expandedArgs; - for (std::vector<std::string>::iterator i = args.begin(); i != args.end(); - ++i) { + for (std::string const& i : args) { // check for nmake temporary files - if ((*i)[0] == '@' && i->find("@CMakeFiles") != 0) { - cmsys::ifstream fin(i->substr(1).c_str()); + if (i[0] == '@' && i.find("@CMakeFiles") != 0) { + cmsys::ifstream fin(i.substr(1).c_str()); std::string line; while (cmSystemTools::GetLineFromStream(fin, line)) { cmSystemTools::ParseWindowsCommandLine(line.c_str(), expandedArgs); } } else { - expandedArgs.push_back(*i); + expandedArgs.push_back(i); } } |