diff --git a/poincare/include/poincare/expression_node.h b/poincare/include/poincare/expression_node.h index 4499bcee7..f9b5f7ebd 100644 --- a/poincare/include/poincare/expression_node.h +++ b/poincare/include/poincare/expression_node.h @@ -147,7 +147,7 @@ public: virtual Evaluation approximate(DoublePrecision p, Context& context, Preferences::AngleUnit angleUnit) const = 0; /* Simplification */ - /*!*/ virtual Expression shallowReduce(Context & context, Preferences::AngleUnit angleUnit); + /*!*/ virtual Expression shallowReduce(Context & context, Preferences::AngleUnit angleUnit, const Expression futureParent = Expression()); /*!*/ virtual Expression shallowBeautify(Context & context, Preferences::AngleUnit angleUnit); /* Return a clone of the denominator part of the expression */ /*!*/ virtual Expression denominator(Context & context, Preferences::AngleUnit angleUnit) const; diff --git a/poincare/src/expression_node.cpp b/poincare/src/expression_node.cpp index 8e73a479a..082e0fab4 100644 --- a/poincare/src/expression_node.cpp +++ b/poincare/src/expression_node.cpp @@ -88,8 +88,8 @@ int ExpressionNode::simplificationOrderSameType(const ExpressionNode * e, bool c return 0; } -Expression ExpressionNode::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) { - return Expression(this).defaultShallowReduce(context, angleUnit); +Expression ExpressionNode::shallowReduce(Context & context, Preferences::AngleUnit angleUnit, const Expression futureParent) { + return Expression(this).defaultShallowReduce(context, angleUnit, futureParent); } Expression ExpressionNode::shallowBeautify(Context & context, Preferences::AngleUnit angleUnit) {