From c8cff770a37cb0a828fd1cdc4d7a8dd197f0d77b Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Tue, 10 Sep 2019 23:19:22 +0200
Subject: [PATCH] Drop else after return in if statements.

---
 Applications/FileIO/GocadIO/GocadAsciiReader.cpp  | 15 ++++++---------
 .../ThermoMechanics/ThermoMechanicsProcess.cpp    |  7 ++-----
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp
index cecdd4db378..b0c4df71e7d 100644
--- a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp
+++ b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp
@@ -116,23 +116,20 @@ DataType datasetFound(std::ifstream& in)
         {
             return DataType::VSET;
         }
-        else if (isKeyword(DataType::PLINE, line))
+        if (isKeyword(DataType::PLINE, line))
         {
             return DataType::PLINE;
         }
-        else if (isKeyword(DataType::TSURF, line))
+        if (isKeyword(DataType::TSURF, line))
         {
             return DataType::TSURF;
         }
-        else if (isKeyword(DataType::MODEL3D, line))
+        if (isKeyword(DataType::MODEL3D, line))
         {
             return DataType::MODEL3D;
         }
-        else
-        {
-            ERR("No known identifier found...");
-            return DataType::UNDEFINED;
-        }
+        ERR("No known identifier found...");
+        return DataType::UNDEFINED;
     }
     return DataType::UNDEFINED;
 }
@@ -274,7 +271,7 @@ bool parseNodes(std::ifstream& in,
             return true;
         }
 
-        else if (line.substr(0, 4) == "TRGL")
+        if (line.substr(0, 4) == "TRGL")
         {
             in.seekg(pos);
             return true;
diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp
index 125fc0ca4a1..04a30cf2377 100644
--- a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp
+++ b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp
@@ -148,11 +148,8 @@ void ThermoMechanicsProcess<DisplacementDim>::constructDofTable()
         constructMonolithicProcessDofTable();
         return;
     }
-    else
-    {
-        constructDofTableOfSpecifiedProsessStaggerdScheme(
-            _process_data.mechanics_process_id);
-    }
+    constructDofTableOfSpecifiedProsessStaggerdScheme(
+        _process_data.mechanics_process_id);
 
     // TODO move the two data members somewhere else.
     // for extrapolation of secondary variables of stress or strain
-- 
GitLab