summaryrefslogtreecommitdiff
path: root/Source/CPack/cmCPackSTGZGenerator.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-16 01:04:51 +0300
committerBrad King <brad.king@kitware.com>2017-09-19 08:06:08 -0400
commitf43baf69814176f52b2b229667c4d3e88154bdea (patch)
tree58d8ff3131b492e71be8feb701a013e28f00dd9c /Source/CPack/cmCPackSTGZGenerator.cxx
parentc0c5f924fe46fcf83603117689b372cb8520c4bb (diff)
downloadcmake-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.cxx6
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