From f06fe953ce5facbb1961942f0ed0a0a219650985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 17 Aug 2018 12:10:37 +0200 Subject: [PATCH] [poincare] Change call to Expression::shallowReduce to Expression::defaultShallowReduce to avoid infinite loop --- poincare/src/absolute_value.cpp | 2 +- poincare/src/arc_cosine.cpp | 2 +- poincare/src/arc_sine.cpp | 2 +- poincare/src/arc_tangent.cpp | 2 +- poincare/src/binomial_coefficient.cpp | 2 +- poincare/src/ceiling.cpp | 2 +- poincare/src/complex_argument.cpp | 2 +- poincare/src/confidence_interval.cpp | 2 +- poincare/src/conjugate.cpp | 2 +- poincare/src/cosine.cpp | 2 +- poincare/src/decimal.cpp | 2 +- poincare/src/derivative.cpp | 2 +- poincare/src/determinant.cpp | 2 +- poincare/src/division.cpp | 2 +- poincare/src/division_quotient.cpp | 2 +- poincare/src/division_remainder.cpp | 2 +- poincare/src/equal.cpp | 2 +- poincare/src/factorial.cpp | 2 +- poincare/src/floor.cpp | 2 +- poincare/src/frac_part.cpp | 2 +- poincare/src/great_common_divisor.cpp | 2 +- poincare/src/hyperbolic_arc_cosine.cpp | 2 +- poincare/src/hyperbolic_arc_sine.cpp | 2 +- poincare/src/hyperbolic_arc_tangent.cpp | 2 +- poincare/src/hyperbolic_cosine.cpp | 2 +- poincare/src/hyperbolic_sine.cpp | 2 +- poincare/src/hyperbolic_tangent.cpp | 2 +- poincare/src/imaginary_part.cpp | 2 +- poincare/src/integral.cpp | 2 +- poincare/src/least_common_multiple.cpp | 2 +- poincare/src/logarithm.cpp | 2 +- poincare/src/matrix_dimension.cpp | 2 +- poincare/src/matrix_inverse.cpp | 2 +- poincare/src/matrix_trace.cpp | 2 +- poincare/src/matrix_transpose.cpp | 2 +- poincare/src/multiplication.cpp | 4 ++-- poincare/src/naperian_logarithm.cpp | 2 +- poincare/src/nth_root.cpp | 2 +- poincare/src/opposite.cpp | 4 ++-- poincare/src/parenthesis.cpp | 2 +- poincare/src/permute_coefficient.cpp | 2 +- poincare/src/power.cpp | 2 +- poincare/src/prediction_interval.cpp | 2 +- poincare/src/real_part.cpp | 2 +- poincare/src/round.cpp | 2 +- poincare/src/sine.cpp | 2 +- poincare/src/square_root.cpp | 2 +- poincare/src/subtraction.cpp | 2 +- poincare/src/tangent.cpp | 2 +- 49 files changed, 51 insertions(+), 51 deletions(-) diff --git a/poincare/src/absolute_value.cpp b/poincare/src/absolute_value.cpp index 5df5ade5d..9639b94ea 100644 --- a/poincare/src/absolute_value.cpp +++ b/poincare/src/absolute_value.cpp @@ -28,7 +28,7 @@ LayoutRef AbsoluteValue::createLayout(Preferences::PrintFloatMode floatDisplayMo } Expression AbsoluteValue::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/arc_cosine.cpp b/poincare/src/arc_cosine.cpp index 7ec34e990..56b3a0593 100644 --- a/poincare/src/arc_cosine.cpp +++ b/poincare/src/arc_cosine.cpp @@ -18,7 +18,7 @@ Expression * ArcCosine::clone() const { } Expression ArcCosine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/arc_sine.cpp b/poincare/src/arc_sine.cpp index 94f7ac38c..b14ec152b 100644 --- a/poincare/src/arc_sine.cpp +++ b/poincare/src/arc_sine.cpp @@ -18,7 +18,7 @@ Expression * ArcSine::clone() const { } Expression ArcSine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/arc_tangent.cpp b/poincare/src/arc_tangent.cpp index 67d24e7f0..ac23142d3 100644 --- a/poincare/src/arc_tangent.cpp +++ b/poincare/src/arc_tangent.cpp @@ -18,7 +18,7 @@ Expression * ArcTangent::clone() const { } Expression ArcTangent::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/binomial_coefficient.cpp b/poincare/src/binomial_coefficient.cpp index 212114560..7446de6b1 100644 --- a/poincare/src/binomial_coefficient.cpp +++ b/poincare/src/binomial_coefficient.cpp @@ -21,7 +21,7 @@ Expression * BinomialCoefficient::clone() const { } Expression BinomialCoefficient::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/ceiling.cpp b/poincare/src/ceiling.cpp index bbd55f886..794d569f7 100644 --- a/poincare/src/ceiling.cpp +++ b/poincare/src/ceiling.cpp @@ -21,7 +21,7 @@ Expression * Ceiling::clone() const { } Expression Ceiling::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/complex_argument.cpp b/poincare/src/complex_argument.cpp index 993b177ef..39947f066 100644 --- a/poincare/src/complex_argument.cpp +++ b/poincare/src/complex_argument.cpp @@ -17,7 +17,7 @@ Expression * ComplexArgument::clone() const { } Expression ComplexArgument::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/confidence_interval.cpp b/poincare/src/confidence_interval.cpp index 9d19fbd2b..50da74f3e 100644 --- a/poincare/src/confidence_interval.cpp +++ b/poincare/src/confidence_interval.cpp @@ -25,7 +25,7 @@ int ConfidenceInterval::polynomialDegree(char symbolName) const { } Expression ConfidenceInterval::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/conjugate.cpp b/poincare/src/conjugate.cpp index acba79c88..8591ba02f 100644 --- a/poincare/src/conjugate.cpp +++ b/poincare/src/conjugate.cpp @@ -20,7 +20,7 @@ LayoutRef Conjugate::createLayout(Preferences::PrintFloatMode floatDisplayMode, } Expression Conjugate::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/cosine.cpp b/poincare/src/cosine.cpp index 97c360814..3fd52c830 100644 --- a/poincare/src/cosine.cpp +++ b/poincare/src/cosine.cpp @@ -33,7 +33,7 @@ std::complex Cosine::computeOnComplex(const std::complex c, Preferences::A } Expression Cosine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/decimal.cpp b/poincare/src/decimal.cpp index 8a1918ff8..bb7a194b1 100644 --- a/poincare/src/decimal.cpp +++ b/poincare/src/decimal.cpp @@ -274,7 +274,7 @@ Decimal::Decimal(size_t size, Integer m, int e) : Number(TreePool::sharedPool()- } Expression Decimal::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) const { - Expression e = Expression::shallowReduce(context, angleUnit); + Expression e = Expression::defaultShallowReduce(context, angleUnit); if (e.isUndefinedOrAllocationFailure()) { return e; } diff --git a/poincare/src/derivative.cpp b/poincare/src/derivative.cpp index 6fc71f520..a303648a9 100644 --- a/poincare/src/derivative.cpp +++ b/poincare/src/derivative.cpp @@ -30,7 +30,7 @@ int Derivative::polynomialDegree(char symbolName) const { } Expression Derivative::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/determinant.cpp b/poincare/src/determinant.cpp index 8f78aeab5..35ce7bd6c 100644 --- a/poincare/src/determinant.cpp +++ b/poincare/src/determinant.cpp @@ -17,7 +17,7 @@ Expression * Determinant::clone() const { } Expression Determinant::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/division.cpp b/poincare/src/division.cpp index 205a2784d..d94022e04 100644 --- a/poincare/src/division.cpp +++ b/poincare/src/division.cpp @@ -65,7 +65,7 @@ template MatrixComplex DivisionNode::computeOnMatrices(const Matr // Division Expression Division::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) const { - Expression result = Expression::shallowReduce(context, angleUnit); + Expression result = Expression::defaultShallowReduce(context, angleUnit); if (result.isUndefinedOrAllocationFailure()) { return result; } diff --git a/poincare/src/division_quotient.cpp b/poincare/src/division_quotient.cpp index 43ab98131..32a469234 100644 --- a/poincare/src/division_quotient.cpp +++ b/poincare/src/division_quotient.cpp @@ -19,7 +19,7 @@ Expression * DivisionQuotient::clone() const { } Expression DivisionQuotient::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/division_remainder.cpp b/poincare/src/division_remainder.cpp index ffe6b4841..2a27877ea 100644 --- a/poincare/src/division_remainder.cpp +++ b/poincare/src/division_remainder.cpp @@ -19,7 +19,7 @@ Expression * DivisionRemainder::clone() const { } Expression DivisionRemainder::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/equal.cpp b/poincare/src/equal.cpp index 77648deb5..475b39a18 100644 --- a/poincare/src/equal.cpp +++ b/poincare/src/equal.cpp @@ -39,7 +39,7 @@ Expression * Equal::standardEquation(Context & context, Preferences::AngleUnit a } Expression Equal::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/factorial.cpp b/poincare/src/factorial.cpp index 2ff745093..3017ae9da 100644 --- a/poincare/src/factorial.cpp +++ b/poincare/src/factorial.cpp @@ -37,7 +37,7 @@ bool Factorial::needsParenthesesWithParent(const SerializationHelperInterface * /* Simplification */ Expression Factorial::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/floor.cpp b/poincare/src/floor.cpp index 528bd7fd6..6f34eaa97 100644 --- a/poincare/src/floor.cpp +++ b/poincare/src/floor.cpp @@ -21,7 +21,7 @@ Expression * Floor::clone() const { } Expression Floor::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/frac_part.cpp b/poincare/src/frac_part.cpp index b83147314..d8b96b429 100644 --- a/poincare/src/frac_part.cpp +++ b/poincare/src/frac_part.cpp @@ -18,7 +18,7 @@ Expression * FracPart::clone() const { } Expression FracPart::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/great_common_divisor.cpp b/poincare/src/great_common_divisor.cpp index 1dcf5d96b..655ae1ff1 100644 --- a/poincare/src/great_common_divisor.cpp +++ b/poincare/src/great_common_divisor.cpp @@ -20,7 +20,7 @@ Expression * GreatCommonDivisor::clone() const { } Expression GreatCommonDivisor::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/hyperbolic_arc_cosine.cpp b/poincare/src/hyperbolic_arc_cosine.cpp index 690456539..068be5f05 100644 --- a/poincare/src/hyperbolic_arc_cosine.cpp +++ b/poincare/src/hyperbolic_arc_cosine.cpp @@ -18,7 +18,7 @@ Expression * HyperbolicArcCosine::clone() const { } Expression HyperbolicArcCosine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/hyperbolic_arc_sine.cpp b/poincare/src/hyperbolic_arc_sine.cpp index 84f7e2986..08fe8a8f4 100644 --- a/poincare/src/hyperbolic_arc_sine.cpp +++ b/poincare/src/hyperbolic_arc_sine.cpp @@ -18,7 +18,7 @@ Expression * HyperbolicArcSine::clone() const { } Expression HyperbolicArcSine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/hyperbolic_arc_tangent.cpp b/poincare/src/hyperbolic_arc_tangent.cpp index e341a4b9a..ffeee8b1f 100644 --- a/poincare/src/hyperbolic_arc_tangent.cpp +++ b/poincare/src/hyperbolic_arc_tangent.cpp @@ -18,7 +18,7 @@ Expression * HyperbolicArcTangent::clone() const { } Expression HyperbolicArcTangent::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/hyperbolic_cosine.cpp b/poincare/src/hyperbolic_cosine.cpp index 82b16c6b6..defa80102 100644 --- a/poincare/src/hyperbolic_cosine.cpp +++ b/poincare/src/hyperbolic_cosine.cpp @@ -22,7 +22,7 @@ Expression * HyperbolicCosine::clone() const { } Expression HyperbolicCosine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/hyperbolic_sine.cpp b/poincare/src/hyperbolic_sine.cpp index d245f3f59..832e0063e 100644 --- a/poincare/src/hyperbolic_sine.cpp +++ b/poincare/src/hyperbolic_sine.cpp @@ -22,7 +22,7 @@ Expression * HyperbolicSine::clone() const { } Expression HyperbolicSine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/hyperbolic_tangent.cpp b/poincare/src/hyperbolic_tangent.cpp index de6cadbee..d64317a63 100644 --- a/poincare/src/hyperbolic_tangent.cpp +++ b/poincare/src/hyperbolic_tangent.cpp @@ -21,7 +21,7 @@ Expression * HyperbolicTangent::clone() const { } Expression HyperbolicTangent::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/imaginary_part.cpp b/poincare/src/imaginary_part.cpp index 4ba60d83b..210458f70 100644 --- a/poincare/src/imaginary_part.cpp +++ b/poincare/src/imaginary_part.cpp @@ -19,7 +19,7 @@ Expression * ImaginaryPart::clone() const { Expression ImaginaryPart::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/integral.cpp b/poincare/src/integral.cpp index e9ab9edef..860792f6e 100644 --- a/poincare/src/integral.cpp +++ b/poincare/src/integral.cpp @@ -32,7 +32,7 @@ int Integral::polynomialDegree(char symbolName) const { } Expression Integral::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/least_common_multiple.cpp b/poincare/src/least_common_multiple.cpp index 8027c3447..8afc1b404 100644 --- a/poincare/src/least_common_multiple.cpp +++ b/poincare/src/least_common_multiple.cpp @@ -20,7 +20,7 @@ Expression * LeastCommonMultiple::clone() const { } Expression LeastCommonMultiple::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/logarithm.cpp b/poincare/src/logarithm.cpp index 6b901c7e9..9581287bf 100644 --- a/poincare/src/logarithm.cpp +++ b/poincare/src/logarithm.cpp @@ -60,7 +60,7 @@ Expression * Logarithm::simpleShallowReduce(Context & context, Preferences::Angl } Expression Logarithm::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/matrix_dimension.cpp b/poincare/src/matrix_dimension.cpp index 58b27c276..994980e22 100644 --- a/poincare/src/matrix_dimension.cpp +++ b/poincare/src/matrix_dimension.cpp @@ -17,7 +17,7 @@ Expression * MatrixDimension::clone() const { } Expression MatrixDimension::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/matrix_inverse.cpp b/poincare/src/matrix_inverse.cpp index e3c9eb6d7..d59d833af 100644 --- a/poincare/src/matrix_inverse.cpp +++ b/poincare/src/matrix_inverse.cpp @@ -20,7 +20,7 @@ Expression * MatrixInverse::clone() const { } Expression MatrixInverse::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/matrix_trace.cpp b/poincare/src/matrix_trace.cpp index d23404214..f0bfec02b 100644 --- a/poincare/src/matrix_trace.cpp +++ b/poincare/src/matrix_trace.cpp @@ -19,7 +19,7 @@ Expression * MatrixTrace::clone() const { } Expression MatrixTrace::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/matrix_transpose.cpp b/poincare/src/matrix_transpose.cpp index 0d2e40864..deb7803fc 100644 --- a/poincare/src/matrix_transpose.cpp +++ b/poincare/src/matrix_transpose.cpp @@ -18,7 +18,7 @@ Expression * MatrixTranspose::clone() const { } Expression MatrixTranspose::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/multiplication.cpp b/poincare/src/multiplication.cpp index 10b46d51c..b71c3e4cb 100644 --- a/poincare/src/multiplication.cpp +++ b/poincare/src/multiplication.cpp @@ -190,10 +190,10 @@ Expression Multiplication::shallowReduce(Context& context, Preferences::AngleUni } Expression Multiplication::privateShallowReduce(Context & context, Preferences::AngleUnit angleUnit, bool shouldExpand, bool canBeInterrupted) const { - return Expression::shallowReduce(context, angleUnit);; + return Expression::defaultShallowReduce(context, angleUnit);; //TODO #if 0 - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/naperian_logarithm.cpp b/poincare/src/naperian_logarithm.cpp index 2d8d58c89..55a3128ee 100644 --- a/poincare/src/naperian_logarithm.cpp +++ b/poincare/src/naperian_logarithm.cpp @@ -21,7 +21,7 @@ Expression * NaperianLogarithm::clone() const { } Expression NaperianLogarithm::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/nth_root.cpp b/poincare/src/nth_root.cpp index 864ab17c6..16c483105 100644 --- a/poincare/src/nth_root.cpp +++ b/poincare/src/nth_root.cpp @@ -20,7 +20,7 @@ Expression * NthRoot::clone() const { } Expression NthRoot::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/opposite.cpp b/poincare/src/opposite.cpp index a891a5366..82de88ca4 100644 --- a/poincare/src/opposite.cpp +++ b/poincare/src/opposite.cpp @@ -69,8 +69,8 @@ Expression OppositeNode::shallowReduce(Context& context, Preferences::AngleUnit /* Simplification */ -Expression Opposite::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) { - Expression result = Expression::shallowReduce(context, angleUnit); +Expression Opposite::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { + Expression result = Expression::defaultShallowReduce(context, angleUnit); if (result.isUndefinedOrAllocationFailure()) { return result; } diff --git a/poincare/src/parenthesis.cpp b/poincare/src/parenthesis.cpp index 234c0df17..d508f8147 100644 --- a/poincare/src/parenthesis.cpp +++ b/poincare/src/parenthesis.cpp @@ -32,7 +32,7 @@ Evaluation ParenthesisNode::templatedApproximate(Context& context, Preference } Expression Parenthesis::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) const { - Expression e = Expression::shallowReduce(context, angleUnit); + Expression e = Expression::defaultShallowReduce(context, angleUnit); if (e.isUndefinedOrAllocationFailure()) { return e; } diff --git a/poincare/src/permute_coefficient.cpp b/poincare/src/permute_coefficient.cpp index b4645184e..7aca16705 100644 --- a/poincare/src/permute_coefficient.cpp +++ b/poincare/src/permute_coefficient.cpp @@ -19,7 +19,7 @@ Expression * PermuteCoefficient::clone() const { } Expression PermuteCoefficient::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index 66e0a4c25..569c1e02f 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -254,7 +254,7 @@ Expression Power::shallowReduce(Context& context, Preferences::AngleUnit angleUn return result; //TODO #if 0 - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/prediction_interval.cpp b/poincare/src/prediction_interval.cpp index d9100da2d..8fa4b92a3 100644 --- a/poincare/src/prediction_interval.cpp +++ b/poincare/src/prediction_interval.cpp @@ -26,7 +26,7 @@ int PredictionInterval::polynomialDegree(char symbolName) const { } Expression PredictionInterval::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/real_part.cpp b/poincare/src/real_part.cpp index 2fd3a21dd..4424af6d5 100644 --- a/poincare/src/real_part.cpp +++ b/poincare/src/real_part.cpp @@ -17,7 +17,7 @@ Expression * RealPart::clone() const { } Expression RealPart::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/round.cpp b/poincare/src/round.cpp index 9f2b9ec4d..01a7ef8a9 100644 --- a/poincare/src/round.cpp +++ b/poincare/src/round.cpp @@ -20,7 +20,7 @@ Expression * Round::clone() const { } Expression Round::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/sine.cpp b/poincare/src/sine.cpp index 3bae26dac..12bebe8ad 100644 --- a/poincare/src/sine.cpp +++ b/poincare/src/sine.cpp @@ -33,7 +33,7 @@ std::complex Sine::computeOnComplex(const std::complex c, Preferences::Ang } Expression Sine::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/square_root.cpp b/poincare/src/square_root.cpp index be505b6bd..b510efcdc 100644 --- a/poincare/src/square_root.cpp +++ b/poincare/src/square_root.cpp @@ -37,7 +37,7 @@ std::complex SquareRoot::computeOnComplex(const std::complex c, Preference } Expression SquareRoot::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; } diff --git a/poincare/src/subtraction.cpp b/poincare/src/subtraction.cpp index 46bdd858e..d420fdf07 100644 --- a/poincare/src/subtraction.cpp +++ b/poincare/src/subtraction.cpp @@ -58,7 +58,7 @@ Expression SubtractionNode::shallowReduce(Context& context, Preferences::AngleUn } Expression Subtraction::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) const { - Expression e = Expression::shallowReduce(context, angleUnit); + Expression e = Expression::defaultShallowReduce(context, angleUnit); if (e.type() == ExpressionNode::Type::AllocationFailure || e.type() == ExpressionNode::Type::Undefined ) { //TODO use Expression method to make the || return e; } diff --git a/poincare/src/tangent.cpp b/poincare/src/tangent.cpp index 6a8036a0b..713a21bd2 100644 --- a/poincare/src/tangent.cpp +++ b/poincare/src/tangent.cpp @@ -34,7 +34,7 @@ std::complex Tangent::computeOnComplex(const std::complex c, Preferences:: } Expression Tangent::shallowReduce(Context& context, Preferences::AngleUnit angleUnit) { - Expression * e = Expression::shallowReduce(context, angleUnit); + Expression * e = Expression::defaultShallowReduce(context, angleUnit); if (e != this) { return e; }