From 651b705dbd717037e786105c74c114d82b725f1f Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Fri, 13 Mar 2020 17:01:06 +0100 Subject: [PATCH] Revert "[poincare/expression] deepBeautify bubbles up Undefined children" This reverts commit 300399fe4d5fb5273a326a48067280c0fd1088b1. Not necessary anymore to bubble up Undefined children in deepBeautify since Unit::shallowBeautify does not introduce any Undefined Expression. --- poincare/src/expression.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/poincare/src/expression.cpp b/poincare/src/expression.cpp index 62dc03bc0..361af0cb4 100644 --- a/poincare/src/expression.cpp +++ b/poincare/src/expression.cpp @@ -825,12 +825,6 @@ Expression Expression::deepBeautify(ExpressionNode::ReductionContext reductionCo for (int i = 0; i < nbChildren; i++) { Expression child = e.childAtIndex(i); child = child.deepBeautify(reductionContext); - /* Unit::shallowBeautify replaces units in inhomogeneous Expression by - * Undefined. Undefined children must be bubbled up to the root. - */ - if (child.type() == ExpressionNode::Type::Undefined) { - return e.replaceWithUndefinedInPlace(); - } // We add missing Parentheses after beautifying the parent and child if (e.node()->childAtIndexNeedsUserParentheses(child, i)) { e.replaceChildAtIndexInPlace(i, Parenthesis::Builder(child));