From 2ae435a628d04b9430f8bde67a3a1aa558d00809 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Mon, 3 Feb 2020 16:51:57 +0100 Subject: [PATCH] [apps/calculation/calculation] Remove redundancy When each Calculation had its own text buffer, the Expression of an overflowing output text was Undefined. Hence that Expression could have been Undefined without the corresponding text being 'undef'. That situation may not happen anymore since Calculation are stored in a shared buffer. --- apps/calculation/calculation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/calculation/calculation.cpp b/apps/calculation/calculation.cpp index 708a26f51..f401a7349 100644 --- a/apps/calculation/calculation.cpp +++ b/apps/calculation/calculation.cpp @@ -231,9 +231,8 @@ Calculation::DisplayOutput Calculation::displayOutput(Context * context) { strcmp(exactOutputText(), approximateOutputText(NumberOfSignificantDigits::UserDefined)) == 0 || // If the approximate output is 'unreal' or the exact result is 'undef' - (strcmp(exactOutputText(), Undefined::Name()) == 0 || - strcmp(approximateOutputText(NumberOfSignificantDigits::Maximal), Unreal::Name()) == 0 || - exactOutput().type() == ExpressionNode::Type::Undefined) + strcmp(exactOutputText(), Undefined::Name()) == 0 || + strcmp(approximateOutputText(NumberOfSignificantDigits::Maximal), Unreal::Name()) == 0 || /* If the approximate output is 'undef' and the input and exactOutput are * equal */