Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
fintarin committed Mar 26, 2024
1 parent 6ea98fc commit 6eb8169
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/fintamath/core/Parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Parser final {
template <typename Type>
requires(!std::is_abstract_v<Type> && !StringConstructable<Type> && EmptyConstructable<Type>)
void registerType() {
const std::string name = Type{}.toString();
static const std::string name = Type{}.toString();

stringToConstructorsMap[name].emplace_back([]() -> Return {
return std::make_unique<Type>();
Expand Down
3 changes: 2 additions & 1 deletion include/fintamath/expressions/Expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ Expression operator/(const Variable &lhs, const Expression &rhs);
template <typename Function, bool isPolynomial>
void Expression::registerExpressionConstructor(ExpressionConstructor constructor) {
getExpressionMaker()[Function::getClassStatic()] = [maker = std::move(constructor)](ArgumentPtrVector &&args) {
const size_t funcArgSize = Function{}.getArgumentClasses().size();
static const size_t funcArgSize = Function{}.getArgumentClasses().size();

std::unique_ptr<IMathObject> res;

if constexpr (Function::isVariadicStatic()) {
Expand Down

0 comments on commit 6eb8169

Please sign in to comment.