summaryrefslogtreecommitdiffstats
path: root/Source/cmXCode21Object.cxx
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-20 21:44:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-28 11:23:43 (GMT)
commitf0bab294dcd3f2c4f3be5e491426b5eefb2a9aba (patch)
treec50347984fbb1086cd99de7b440dad6f72070f5b /Source/cmXCode21Object.cxx
parentb5d7f5b0e8490a66cdd603e0ee38890426b3b6c4 (diff)
downloadCMake-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/cmXCode21Object.cxx')
-rw-r--r--Source/cmXCode21Object.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index 719e627..a9bb2ef 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -34,9 +34,7 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
std::ostream& out, PBXType t)
{
bool hasOne = false;
- for (std::vector<cmXCodeObject*>::const_iterator i = v.begin(); i != v.end();
- ++i) {
- cmXCodeObject* obj = *i;
+ for (auto obj : v) {
if (obj->GetType() == OBJECT && obj->GetIsA() == t) {
hasOne = true;
break;
@@ -46,9 +44,7 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
return;
}
out << "\n/* Begin " << PBXTypeNames[t] << " section */\n";
- for (std::vector<cmXCodeObject*>::const_iterator i = v.begin(); i != v.end();
- ++i) {
- cmXCodeObject* obj = *i;
+ for (auto obj : v) {
if (obj->GetType() == OBJECT && obj->GetIsA() == t) {
obj->Print(out);
}