From 7ea0a4b7cc5e09cfe7ff63e9955adeb3d5b58c33 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Sun, 24 Feb 2019 15:37:27 +0100 Subject: [PATCH] Change else after return cases. --- Applications/DataHolderLib/BoundaryCondition.cpp | 4 ++-- Applications/DataHolderLib/SourceTerm.cpp | 4 ++-- Applications/Utils/FileConverter/TecPlotTools.cpp | 6 +++--- .../LinearConcentrationAndPressureDependentDensity.h | 2 +- MathLib/KelvinVector.cpp | 2 +- ProcessLib/HT/HTFEM.h | 4 +--- ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h | 2 +- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Applications/DataHolderLib/BoundaryCondition.cpp b/Applications/DataHolderLib/BoundaryCondition.cpp index 33270b870b2..47fd4726e9c 100644 --- a/Applications/DataHolderLib/BoundaryCondition.cpp +++ b/Applications/DataHolderLib/BoundaryCondition.cpp @@ -28,7 +28,7 @@ BoundaryCondition::ConditionType BoundaryCondition::convertStringToType( { return ConditionType::DIRICHLET; } - else if (str == "NonuniformDirichlet") + if (str == "NonuniformDirichlet") { return ConditionType::NONUNIFORMDIRICHLET; } @@ -54,7 +54,7 @@ std::string BoundaryCondition::convertTypeToString(ConditionType type) { return "Dirichlet"; } - else if (type == ConditionType::NONUNIFORMDIRICHLET) + if (type == ConditionType::NONUNIFORMDIRICHLET) { return "NonuniformDirichlet"; } diff --git a/Applications/DataHolderLib/SourceTerm.cpp b/Applications/DataHolderLib/SourceTerm.cpp index 3934ee94246..2da166bf44b 100644 --- a/Applications/DataHolderLib/SourceTerm.cpp +++ b/Applications/DataHolderLib/SourceTerm.cpp @@ -26,7 +26,7 @@ SourceTerm::ConditionType SourceTerm::convertStringToType( { return ConditionType::NODAL; } - else if (str == "Volume") + if (str == "Volume") { return ConditionType::VOLUME; } @@ -40,7 +40,7 @@ std::string SourceTerm::convertTypeToString(ConditionType type) { return "Nodal"; } - else if (type == ConditionType::VOLUME) + if (type == ConditionType::VOLUME) { return "Volume"; } diff --git a/Applications/Utils/FileConverter/TecPlotTools.cpp b/Applications/Utils/FileConverter/TecPlotTools.cpp index 541cc570850..951578be01a 100644 --- a/Applications/Utils/FileConverter/TecPlotTools.cpp +++ b/Applications/Utils/FileConverter/TecPlotTools.cpp @@ -258,7 +258,7 @@ int splitFile(std::ifstream& in, std::string file_name) out << line << "\n"; continue; } - else if (line.find("VARIABLES") != std::string::npos) + if (line.find("VARIABLES") != std::string::npos) { if (dataCountError(out, name, val_count, val_total)) { @@ -268,7 +268,7 @@ int splitFile(std::ifstream& in, std::string file_name) out << line << "\n"; continue; } - else if (line.find("ZONE") != std::string::npos) + if (line.find("ZONE") != std::string::npos) { if (dataCountError(out, name, val_count, val_total)) { @@ -316,7 +316,7 @@ int convertFile(std::ifstream& in, std::string file_name) { continue; } - else if (line.find("TITLE") != std::string::npos) + if (line.find("TITLE") != std::string::npos) { if (dataCountError(name, val_count, val_total)) { diff --git a/MaterialLib/Fluid/Density/LinearConcentrationAndPressureDependentDensity.h b/MaterialLib/Fluid/Density/LinearConcentrationAndPressureDependentDensity.h index 4145a47385e..963be12861f 100644 --- a/MaterialLib/Fluid/Density/LinearConcentrationAndPressureDependentDensity.h +++ b/MaterialLib/Fluid/Density/LinearConcentrationAndPressureDependentDensity.h @@ -88,7 +88,7 @@ public: return _reference_density * _fluid_density_concentration_difference_ratio; } - else if (var == PropertyVariableType::p) + if (var == PropertyVariableType::p) { return _reference_density * _fluid_density_pressure_difference_ratio; diff --git a/MathLib/KelvinVector.cpp b/MathLib/KelvinVector.cpp index 4f2131aa2f2..49fba2c3897 100644 --- a/MathLib/KelvinVector.cpp +++ b/MathLib/KelvinVector.cpp @@ -169,7 +169,7 @@ kelvinVectorToSymmetricTensor(Eigen::Matrix<double, { return kelvinVectorToSymmetricTensor<4>(v); } - else if (v.size() == 6) + if (v.size() == 6) { return kelvinVectorToSymmetricTensor<6>(v); } diff --git a/ProcessLib/HT/HTFEM.h b/ProcessLib/HT/HTFEM.h index a08ff5af5d5..2ac9e6274e5 100644 --- a/ProcessLib/HT/HTFEM.h +++ b/ProcessLib/HT/HTFEM.h @@ -207,8 +207,7 @@ protected: { return thermal_conductivity * I; } - else - { + GlobalDimMatrixType const thermal_dispersivity = fluid_density * specific_heat_capacity_fluid * (thermal_dispersivity_transversal * velocity_magnitude * I + @@ -216,7 +215,6 @@ protected: thermal_dispersivity_transversal) / velocity_magnitude * velocity * velocity.transpose()); return thermal_conductivity * I + thermal_dispersivity; - } } std::vector<double> const& getIntPtDarcyVelocityLocal( diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h b/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h index 384b9246be6..adf3f482d52 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h @@ -186,7 +186,7 @@ public: { return setSigma(values); } - else if (name == "epsilon_ip") + if (name == "epsilon_ip") { return setEpsilon(values); } -- GitLab