diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-09-16 01:04:51 +0300 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-19 08:06:08 -0400 |
commit | f43baf69814176f52b2b229667c4d3e88154bdea (patch) | |
tree | 58d8ff3131b492e71be8feb701a013e28f00dd9c /Source/CPack/cmCPackSTGZGenerator.cxx | |
parent | c0c5f924fe46fcf83603117689b372cb8520c4bb (diff) | |
download | cmake-f43baf69814176f52b2b229667c4d3e88154bdea.tar.gz |
Meta: modernize old-fashioned loops to range-based `for` (CPack).
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
Diffstat (limited to 'Source/CPack/cmCPackSTGZGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackSTGZGenerator.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index c541614267..3d7fd3c14d 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -6,7 +6,6 @@ #include <sstream> #include <stdio.h> #include <string> -#include <vector> #include "cmCPackGenerator.h" #include "cmCPackLog.h" @@ -48,9 +47,8 @@ int cmCPackSTGZGenerator::PackageFiles() * have generated several packages (component packaging) * so we must iterate over generated packages. */ - for (std::vector<std::string>::iterator it = packageFileNames.begin(); - it != packageFileNames.end(); ++it) { - retval &= cmSystemTools::SetPermissions((*it).c_str(), + for (std::string const& pfn : packageFileNames) { + retval &= cmSystemTools::SetPermissions(pfn.c_str(), #if defined(_MSC_VER) || defined(__MINGW32__) S_IREAD | S_IWRITE | S_IEXEC #else |