diff --git a/src/fintamath/expressions/unary/HyperbExpression.cpp b/src/fintamath/expressions/unary/HyperbExpression.cpp index 2d2cc361a..63c97c2d8 100644 --- a/src/fintamath/expressions/unary/HyperbExpression.cpp +++ b/src/fintamath/expressions/unary/HyperbExpression.cpp @@ -48,12 +48,7 @@ std::shared_ptr HyperbExpression::getOppositeFunction(const IFunction {Tanh().toString(), std::make_unique()}, // {Coth().toString(), std::make_unique()}, // }; - - if (auto res = oppositeFunctions.find(function.toString()); res != oppositeFunctions.end()) { - return res->second; - } - - return {}; + return oppositeFunctions.at(function.toString()); } } diff --git a/src/fintamath/expressions/unary/TrigExpression.cpp b/src/fintamath/expressions/unary/TrigExpression.cpp index beec6f60a..497d1a674 100644 --- a/src/fintamath/expressions/unary/TrigExpression.cpp +++ b/src/fintamath/expressions/unary/TrigExpression.cpp @@ -54,11 +54,7 @@ std::shared_ptr TrigExpression::getOppositeFunction(const IFunction & {Tan().toString(), std::make_shared()}, // {Cot().toString(), std::make_shared()}, // }; - - if (auto res = oppositeFunctions.find(function.toString()); res != oppositeFunctions.end()) { - return res->second; - } - - return {}; + return oppositeFunctions.at(function.toString()); } + }