From 4df996cfd24c6b4e3a344650fb4ccaa1109e29a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Mon, 9 Nov 2020 15:30:41 +0100 Subject: [PATCH] [poincare/expression_node] TODO: use ReductionContext via pointers --- poincare/include/poincare/expression_node.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/poincare/include/poincare/expression_node.h b/poincare/include/poincare/expression_node.h index aee2cd79f..6ec6c1d05 100644 --- a/poincare/include/poincare/expression_node.h +++ b/poincare/include/poincare/expression_node.h @@ -286,6 +286,12 @@ public: /*!*/ virtual void deepReduceChildren(ReductionContext reductionContext); /*!*/ virtual void deepBeautifyChildren(ReductionContext reductionContext); /*!*/ virtual Expression shallowReduce(ReductionContext reductionContext); + /* TODO: shallowBeautify takes a pointer to the reduction context, unlike + * other methods. The pointer is needed to allow UnitConvert to modify the + * context and prevent unit modifications (in Expression::deepBeautify, after + * calling UnitConvert::shallowBeautify). + * We should uniformize this behaviour and use pointers in other methods using + * the reduction context. */ /*!*/ virtual Expression shallowBeautify(ReductionContext * reductionContext); /*!*/ virtual bool derivate(ReductionContext, Expression symbol, Expression symbolValue); virtual Expression unaryFunctionDifferential();