summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalXCodeGenerator.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/cmLocalXCodeGenerator.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/cmLocalXCodeGenerator.cxx')
-rw-r--r--Source/cmLocalXCodeGenerator.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index 355c394..853e66c 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -43,9 +43,8 @@ void cmLocalXCodeGenerator::Generate()
cmLocalGenerator::Generate();
const std::vector<cmGeneratorTarget*>& targets = this->GetGeneratorTargets();
- for (std::vector<cmGeneratorTarget*>::const_iterator iter = targets.begin();
- iter != targets.end(); ++iter) {
- (*iter)->HasMacOSXRpathInstallNameDir("");
+ for (auto target : targets) {
+ target->HasMacOSXRpathInstallNameDir("");
}
}
@@ -54,9 +53,8 @@ void cmLocalXCodeGenerator::GenerateInstallRules()
cmLocalGenerator::GenerateInstallRules();
const std::vector<cmGeneratorTarget*>& targets = this->GetGeneratorTargets();
- for (std::vector<cmGeneratorTarget*>::const_iterator iter = targets.begin();
- iter != targets.end(); ++iter) {
- (*iter)->HasMacOSXRpathInstallNameDir("");
+ for (auto target : targets) {
+ target->HasMacOSXRpathInstallNameDir("");
}
}
@@ -69,10 +67,8 @@ void cmLocalXCodeGenerator::ComputeObjectFilenames(
// to avoid exact duplicate file names. Note that Mac file names are not
// typically case sensitive, hence the LowerCase.
std::map<std::string, int> counts;
- for (std::map<cmSourceFile const*, std::string>::iterator si =
- mapping.begin();
- si != mapping.end(); ++si) {
- cmSourceFile const* sf = si->first;
+ for (auto& si : mapping) {
+ cmSourceFile const* sf = si.first;
std::string objectName =
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath());
objectName += ".o";
@@ -82,6 +78,6 @@ void cmLocalXCodeGenerator::ComputeObjectFilenames(
if (2 == counts[objectNameLower]) {
// TODO: emit warning about duplicate name?
}
- si->second = objectName;
+ si.second = objectName;
}
}