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/CPack/cmCPackCygwinBinaryGenerator.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/CPack/cmCPackCygwinBinaryGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackCygwinBinaryGenerator.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx index 2119f78..49a9f15 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -44,10 +44,9 @@ int cmCPackCygwinBinaryGenerator::PackageFiles() // to create the file before the super class is called { cmGeneratedFileStream ofs(manifestFile.c_str()); - for (std::vector<std::string>::const_iterator i = files.begin(); - i != files.end(); ++i) { + for (std::string const& file : files) { // remove the temp dir and replace with /usr - ofs << (*i).substr(tempdir.size()) << "\n"; + ofs << file.substr(tempdir.size()) << "\n"; } ofs << manifest << "\n"; } |