Skip to content

Commit

Permalink
Use simplifyMutable in Expression::simplify & Expression::setVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
fintarin committed Nov 30, 2023
1 parent 5062a1c commit 9b2fee7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fintamath/expressions/Expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ void Expression::setChildren(const ArgumentPtrVector &childVect) {
}

void Expression::setVariables(const std::vector<std::pair<Variable, ArgumentPtr>> &varsToVals) {
simplifyMutable();
IExpression::setVariables(varsToVals);
}

Expand All @@ -121,6 +122,7 @@ void Expression::setVariable(const Variable &var, const Expression &val) {
}

ArgumentPtr Expression::simplify() const {
simplifyMutable();
return child;
}

Expand Down

0 comments on commit 9b2fee7

Please sign in to comment.