Skip to content
Snippets Groups Projects
Commit ce1612d3 authored by Dmitri Naumov's avatar Dmitri Naumov Committed by Tom Fischer
Browse files

Readability: Remove else after return in if-cnd.

parent da5eb4e6
No related branches found
No related tags found
No related merge requests found
...@@ -28,11 +28,11 @@ BoundaryCondition::ConditionType BoundaryCondition::convertStringToType( ...@@ -28,11 +28,11 @@ BoundaryCondition::ConditionType BoundaryCondition::convertStringToType(
{ {
return ConditionType::DIRICHLET; return ConditionType::DIRICHLET;
} }
else if (str == "Neumann") if (str == "Neumann")
{ {
return ConditionType::NEUMANN; return ConditionType::NEUMANN;
} }
else if (str == "Robin") if (str == "Robin")
{ {
return ConditionType::ROBIN; return ConditionType::ROBIN;
} }
...@@ -46,11 +46,11 @@ std::string BoundaryCondition::convertTypeToString(ConditionType type) ...@@ -46,11 +46,11 @@ std::string BoundaryCondition::convertTypeToString(ConditionType type)
{ {
return "Dirichlet"; return "Dirichlet";
} }
else if (type == ConditionType::NEUMANN) if (type == ConditionType::NEUMANN)
{ {
return "Neumann"; return "Neumann";
} }
else if (type == ConditionType::ROBIN) if (type == ConditionType::ROBIN)
{ {
return "Robin"; return "Robin";
} }
......
...@@ -93,10 +93,7 @@ public: ...@@ -93,10 +93,7 @@ public:
return _reference_density * return _reference_density *
_fluid_density_pressure_difference_ratio; _fluid_density_pressure_difference_ratio;
} }
else return 0;
{
return 0;
}
} }
private: private:
......
...@@ -173,13 +173,10 @@ kelvinVectorToSymmetricTensor(Eigen::Matrix<double, ...@@ -173,13 +173,10 @@ kelvinVectorToSymmetricTensor(Eigen::Matrix<double,
{ {
return kelvinVectorToSymmetricTensor<6>(v); return kelvinVectorToSymmetricTensor<6>(v);
} }
else OGS_FATAL(
{ "Kelvin vector to tensor conversion expected an input vector of size 4 "
OGS_FATAL( "or 6, but a vector of size %d was given.",
"Kelvin vector to tensor conversion expected an input vector of " v.size());
"size 4 or 6, but a vector of size %d was given.",
v.size());
}
} }
} // namespace KelvinVector } // namespace KelvinVector
} // namespace MathLib } // namespace MathLib
...@@ -190,7 +190,7 @@ public: ...@@ -190,7 +190,7 @@ public:
{ {
return setEpsilon(values); return setEpsilon(values);
} }
else if (name == "epsilon_m_ip") if (name == "epsilon_m_ip")
{ {
return setEpsilonMechanical(values); return setEpsilonMechanical(values);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment