summaryrefslogtreecommitdiff
path: root/Source/cmMachO.cxx
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-20 23:44:34 +0200
committerBrad King <brad.king@kitware.com>2017-09-28 07:23:43 -0400
commitf0bab294dcd3f2c4f3be5e491426b5eefb2a9aba (patch)
treec50347984fbb1086cd99de7b440dad6f72070f5b /Source/cmMachO.cxx
parentb5d7f5b0e8490a66cdd603e0ee38890426b3b6c4 (diff)
downloadcmake-f0bab294dcd3f2c4f3be5e491426b5eefb2a9aba.tar.gz
Convert some leftover loops to C++11 range-based loop
Fix issues diagnosed by clang-tidy [modern-loop-convert] Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source/cmMachO.cxx')
-rw-r--r--Source/cmMachO.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx
index 8002175bc0..7294c1cbfd 100644
--- a/Source/cmMachO.cxx
+++ b/Source/cmMachO.cxx
@@ -251,8 +251,7 @@ cmMachOInternal::cmMachOInternal(const char* fname)
}
// parse each Mach-O file
- for (size_t i = 0; i < this->FatArchs.size(); i++) {
- const fat_arch& arch = this->FatArchs[i];
+ for (const auto& arch : this->FatArchs) {
if (!this->read_mach_o(OSSwapBigToHostInt32(arch.offset))) {
return;
}
@@ -265,8 +264,8 @@ cmMachOInternal::cmMachOInternal(const char* fname)
cmMachOInternal::~cmMachOInternal()
{
- for (size_t i = 0; i < this->MachOList.size(); i++) {
- delete this->MachOList[i];
+ for (auto& i : this->MachOList) {
+ delete i;
}
}