diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-09-04 20:17:22 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-09-10 20:21:41 (GMT) |
commit | d25a5a7ec91bfa072d3cf1a302830a54506c88c0 (patch) | |
tree | d06203c8e5b5fdd38645e0fb9b284ded26651f44 /Source/cmGlobalXCodeGenerator.cxx | |
parent | bbf48c494ad28d1c8ac5aa6e4cecb35c2cbf1b84 (diff) | |
download | CMake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.zip CMake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.tar.gz CMake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.tar.bz2 |
clang-tidy: modernize-use-auto
Set the MinTypeNameLength option to an impossibly high value in order
to limit the diagnostics to iterators. Leave new expressions and cast
expressions for later.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 3dae824..af5d279 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -582,10 +582,8 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile( } // sort the array - std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>()); - std::vector<std::string>::iterator new_end = - std::unique(lfiles.begin(), lfiles.end()); - lfiles.erase(new_end, lfiles.end()); + std::sort(lfiles.begin(), lfiles.end()); + lfiles.erase(std::unique(lfiles.begin(), lfiles.end()), lfiles.end()); cmake* cm = this->GetCMakeInstance(); if (cm->DoWriteGlobVerifyTarget()) { @@ -2629,8 +2627,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget( return nullptr; } - std::map<cmGeneratorTarget const*, cmXCodeObject*>::const_iterator const i = - this->XCodeObjectMap.find(t); + auto const i = this->XCodeObjectMap.find(t); if (i == this->XCodeObjectMap.end()) { return nullptr; } @@ -2910,8 +2907,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup( } target += gtgt->GetName(); s = cmStrCat(target, '/', sg->GetFullName()); - std::map<std::string, cmXCodeObject*>::iterator it = - this->GroupNameMap.find(s); + auto it = this->GroupNameMap.find(s); if (it != this->GroupNameMap.end()) { return it->second; } @@ -2956,8 +2952,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup( std::string curr_folder = cmStrCat(target, '/'); for (auto const& folder : cmTokenize(sg->GetFullName(), "\\")) { curr_folder += folder; - std::map<std::string, cmXCodeObject*>::iterator i_folder = - this->GroupNameMap.find(curr_folder); + auto const i_folder = this->GroupNameMap.find(curr_folder); // Create new folder if (i_folder == this->GroupNameMap.end()) { cmXCodeObject* group = this->CreatePBXGroup(tgroup, folder); @@ -3269,8 +3264,7 @@ void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( std::string trel = this->ConvertToRelativeForMake(tfull); // Add this target to the post-build phases of its dependencies. - std::map<std::string, cmXCodeObject::StringVec>::const_iterator y = - target->GetDependTargets().find(configName); + auto const y = target->GetDependTargets().find(configName); if (y != target->GetDependTargets().end()) { for (auto const& deptgt : y->second) { makefileStream << this->PostBuildMakeTarget(deptgt, configName) @@ -3290,8 +3284,7 @@ void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( makefileStream << trel << ":"; // List dependencies if any exist. - std::map<std::string, cmXCodeObject::StringVec>::const_iterator x = - target->GetDependLibraries().find(configName); + auto const x = target->GetDependLibraries().find(configName); if (x != target->GetDependLibraries().end()) { for (auto const& deplib : x->second) { std::string file = this->ConvertToRelativeForMake(deplib); |