summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-12 13:15:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-12 13:15:38 (GMT)
commit1a1508c8b840ae016dc8db9da6be4cbe59d5f1aa (patch)
tree0d43865e3fc9e04870c6d7e1360ee81d1da1a68c /Source/cmLocalGenerator.cxx
parentd83bff86409c0e414046d2aeb75946037e0d2de3 (diff)
parentd25a5a7ec91bfa072d3cf1a302830a54506c88c0 (diff)
downloadCMake-1a1508c8b840ae016dc8db9da6be4cbe59d5f1aa.zip
CMake-1a1508c8b840ae016dc8db9da6be4cbe59d5f1aa.tar.gz
CMake-1a1508c8b840ae016dc8db9da6be4cbe59d5f1aa.tar.bz2
Merge topic 'modernize-use-auto'
d25a5a7ec9 clang-tidy: modernize-use-auto Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3783
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9f22277..51eb78c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -649,8 +649,7 @@ void cmLocalGenerator::AddOwnedImportedGeneratorTarget(cmGeneratorTarget* gt)
cmGeneratorTarget* cmLocalGenerator::FindLocalNonAliasGeneratorTarget(
const std::string& name) const
{
- GeneratorTargetMap::const_iterator ti =
- this->GeneratorTargetSearchIndex.find(name);
+ auto ti = this->GeneratorTargetSearchIndex.find(name);
if (ti != this->GeneratorTargetSearchIndex.end()) {
return ti->second;
}
@@ -1741,8 +1740,7 @@ void cmLocalGenerator::AddLanguageFlagsForLinking(
cmGeneratorTarget* cmLocalGenerator::FindGeneratorTargetToUse(
const std::string& name) const
{
- GeneratorTargetMap::const_iterator imported =
- this->ImportedGeneratorTargets.find(name);
+ auto imported = this->ImportedGeneratorTargets.find(name);
if (imported != this->ImportedGeneratorTargets.end()) {
return imported->second;
}
@@ -1943,8 +1941,7 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
std::vector<std::string>& stds = langStdMap[lang];
- std::vector<std::string>::const_iterator stdIt =
- std::find(stds.begin(), stds.end(), standard);
+ auto stdIt = std::find(stds.begin(), stds.end(), standard);
if (stdIt == stds.end()) {
std::string e =
lang + "_STANDARD is set to invalid value '" + standard + "'";
@@ -1953,8 +1950,7 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
return;
}
- std::vector<std::string>::const_iterator defaultStdIt =
- std::find(stds.begin(), stds.end(), defaultStd);
+ auto defaultStdIt = std::find(stds.begin(), stds.end(), defaultStd);
if (defaultStdIt == stds.end()) {
std::string e = "CMAKE_" + lang +
"_STANDARD_DEFAULT is set to invalid value '" + std::string(defaultStd) +
@@ -2851,8 +2847,7 @@ std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName(
const std::string& sin, std::string const& dir_max)
{
// Look for an existing mapped name for this object file.
- std::map<std::string, std::string>::iterator it =
- this->UniqueObjectNamesMap.find(sin);
+ auto it = this->UniqueObjectNamesMap.find(sin);
// If no entry exists create one.
if (it == this->UniqueObjectNamesMap.end()) {