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/cmLocalGenerator.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/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5d831c9..71fe772 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; } @@ -1641,8 +1640,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; } @@ -1843,8 +1841,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 + "'"; @@ -1853,8 +1850,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) + @@ -2720,8 +2716,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()) { |