summaryrefslogtreecommitdiff
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-09-04 22:17:22 +0200
committerRegina Pfeifer <regina@mailbox.org>2019-09-10 22:21:41 +0200
commitd25a5a7ec91bfa072d3cf1a302830a54506c88c0 (patch)
treed06203c8e5b5fdd38645e0fb9b284ded26651f44 /Source/cmDependsFortran.cxx
parentbbf48c494ad28d1c8ac5aa6e4cecb35c2cbf1b84 (diff)
downloadcmake-d25a5a7ec91bfa072d3cf1a302830a54506c88c0.tar.gz
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/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index c30e0bf172..b657ff747a 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -56,8 +56,7 @@ public:
cmFortranSourceInfo& CreateObjectInfo(const std::string& obj,
const std::string& src)
{
- std::map<std::string, cmFortranSourceInfo>::iterator i =
- this->ObjectInfo.find(obj);
+ auto i = this->ObjectInfo.find(obj);
if (i == this->ObjectInfo.end()) {
std::map<std::string, cmFortranSourceInfo>::value_type entry(
obj, cmFortranSourceInfo());
@@ -303,9 +302,7 @@ void cmDependsFortran::ConsiderModule(const std::string& name,
const std::string& stampDir)
{
// Locate each required module.
- using TargetRequiresMap = cmDependsFortranInternals::TargetRequiresMap;
- TargetRequiresMap::iterator required =
- this->Internal->TargetRequires.find(name);
+ auto required = this->Internal->TargetRequires.find(name);
if (required != this->Internal->TargetRequires.end() &&
required->second.empty()) {
// The module is provided by a CMake target. It will have a stamp file.
@@ -321,8 +318,6 @@ bool cmDependsFortran::WriteDependenciesReal(std::string const& obj,
std::ostream& makeDepends,
std::ostream& internalDepends)
{
- using TargetRequiresMap = cmDependsFortranInternals::TargetRequiresMap;
-
// Get the source file for this object.
std::string const& src = info.Source;
@@ -350,8 +345,7 @@ bool cmDependsFortran::WriteDependenciesReal(std::string const& obj,
// The object file should depend on timestamped files for the
// modules it uses.
- TargetRequiresMap::const_iterator required =
- this->Internal->TargetRequires.find(i);
+ auto required = this->Internal->TargetRequires.find(i);
if (required == this->Internal->TargetRequires.end()) {
abort();
}