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/cmake.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/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index e7c714e..170e09b 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1271,8 +1271,7 @@ int cmake::HandleDeleteCacheVariables(const std::string& var) << "Configure will be re-run and you may have to reset some variables.\n" << "The following variables have changed:\n"; /* clang-format on */ - for (std::vector<std::string>::iterator i = argsSplit.begin(); - i != argsSplit.end(); ++i) { + for (auto i = argsSplit.begin(); i != argsSplit.end(); ++i) { SaveCacheEntry save; save.key = *i; warning << *i << "= "; @@ -2188,7 +2187,7 @@ int cmake::CheckBuildSystem() } // Find the newest dependency. - std::vector<std::string>::iterator dep = depends.begin(); + auto dep = depends.begin(); std::string dep_newest = *dep++; for (; dep != depends.end(); ++dep) { int result = 0; @@ -2206,7 +2205,7 @@ int cmake::CheckBuildSystem() } // Find the oldest output. - std::vector<std::string>::iterator out = outputs.begin(); + auto out = outputs.begin(); std::string out_oldest = *out++; for (; out != outputs.end(); ++out) { int result = 0; @@ -2308,8 +2307,7 @@ bool cmake::GetPropertyAsBool(const std::string& prop) cmInstalledFile* cmake::GetOrCreateInstalledFile(cmMakefile* mf, const std::string& name) { - std::map<std::string, cmInstalledFile>::iterator i = - this->InstalledFiles.find(name); + auto i = this->InstalledFiles.find(name); if (i != this->InstalledFiles.end()) { cmInstalledFile& file = i->second; @@ -2322,8 +2320,7 @@ cmInstalledFile* cmake::GetOrCreateInstalledFile(cmMakefile* mf, cmInstalledFile const* cmake::GetInstalledFile(const std::string& name) const { - std::map<std::string, cmInstalledFile>::const_iterator i = - this->InstalledFiles.find(name); + auto i = this->InstalledFiles.find(name); if (i != this->InstalledFiles.end()) { cmInstalledFile const& file = i->second; |