diff options
author | Matthias Maennich <matthias@maennich.net> | 2017-09-20 21:44:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-28 11:23:43 (GMT) |
commit | f0bab294dcd3f2c4f3be5e491426b5eefb2a9aba (patch) | |
tree | c50347984fbb1086cd99de7b440dad6f72070f5b /Source/cmMachO.cxx | |
parent | b5d7f5b0e8490a66cdd603e0ee38890426b3b6c4 (diff) | |
download | CMake-f0bab294dcd3f2c4f3be5e491426b5eefb2a9aba.zip CMake-f0bab294dcd3f2c4f3be5e491426b5eefb2a9aba.tar.gz CMake-f0bab294dcd3f2c4f3be5e491426b5eefb2a9aba.tar.bz2 |
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.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx index 8002175..7294c1c 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; } } |