Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
fintarin committed Aug 9, 2023
1 parent 2c100ca commit f79c78b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
7 changes: 1 addition & 6 deletions src/fintamath/expressions/unary/HyperbExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ std::shared_ptr<IFunction> HyperbExpression::getOppositeFunction(const IFunction
{Tanh().toString(), std::make_unique<Atanh>()}, //
{Coth().toString(), std::make_unique<Acoth>()}, //
};

if (auto res = oppositeFunctions.find(function.toString()); res != oppositeFunctions.end()) {
return res->second;
}

return {};
return oppositeFunctions.at(function.toString());
}

}
8 changes: 2 additions & 6 deletions src/fintamath/expressions/unary/TrigExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ std::shared_ptr<IFunction> TrigExpression::getOppositeFunction(const IFunction &
{Tan().toString(), std::make_shared<Atan>()}, //
{Cot().toString(), std::make_shared<Acot>()}, //
};

if (auto res = oppositeFunctions.find(function.toString()); res != oppositeFunctions.end()) {
return res->second;
}

return {};
return oppositeFunctions.at(function.toString());
}

}

0 comments on commit f79c78b

Please sign in to comment.