From fe5e87fc0da60906908fbab6da76c9bb600d3e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 29 Sep 2017 17:43:32 +0200 Subject: [PATCH] [poincare] fix bug in Parenthesis Change-Id: Id38f52db8e423a5ef0f5cff0e8151ae6d24976c8 --- poincare/include/poincare/parenthesis.h | 1 - poincare/src/parenthesis.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/poincare/include/poincare/parenthesis.h b/poincare/include/poincare/parenthesis.h index 777daeaca..7668e86a1 100644 --- a/poincare/include/poincare/parenthesis.h +++ b/poincare/include/poincare/parenthesis.h @@ -16,7 +16,6 @@ private: Evaluation * privateEvaluate(SinglePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedEvaluate(context, angleUnit); } Evaluation * privateEvaluate(DoublePrecision p, Context& context, AngleUnit angleUnit) const override { return templatedEvaluate(context, angleUnit); } template Evaluation * templatedEvaluate(Context& context, AngleUnit angleUnit) const; - Expression * m_operand; }; } diff --git a/poincare/src/parenthesis.cpp b/poincare/src/parenthesis.cpp index ebd687a5f..ac7d8b157 100644 --- a/poincare/src/parenthesis.cpp +++ b/poincare/src/parenthesis.cpp @@ -20,7 +20,7 @@ Expression * Parenthesis::clone() const { ExpressionLayout * Parenthesis::privateCreateLayout(FloatDisplayMode floatDisplayMode, ComplexFormat complexFormat) const { assert(floatDisplayMode != FloatDisplayMode::Default); assert(complexFormat != ComplexFormat::Default); - return new ParenthesisLayout(m_operand->createLayout(floatDisplayMode, complexFormat)); + return new ParenthesisLayout(operand(0)->createLayout(floatDisplayMode, complexFormat)); } template