mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[poincare] Get rid of SpecialSymbols::Ans
This commit is contained in:
@@ -95,7 +95,7 @@ bool App::textInputIsCorrect(const char * text) {
|
||||
return false;
|
||||
}
|
||||
Expression ansExpression = static_cast<Snapshot *>(snapshot())->calculationStore()->ansExpression(localContext());
|
||||
exp = exp.replaceSymbolWithExpression(Symbol::SpecialSymbols::Ans, ansExpression);
|
||||
exp = exp.replaceSymbolWithExpression("ans", ansExpression);
|
||||
char buffer[Calculation::k_printedExpressionSize];
|
||||
int length = PoincareHelpers::Serialize(exp, buffer, sizeof(buffer));
|
||||
/* if the buffer is totally full, it is VERY likely that writeTextInBuffer
|
||||
|
||||
@@ -34,7 +34,7 @@ void Calculation::reset() {
|
||||
|
||||
void Calculation::setContent(const char * c, Context * context, Expression ansExpression) {
|
||||
reset();
|
||||
Expression input = Expression::parse(c).replaceSymbolWithExpression(Symbol::SpecialSymbols::Ans, ansExpression);
|
||||
Expression input = Expression::parse(c).replaceSymbolWithExpression("ans", ansExpression);
|
||||
/* We do not store directly the text enter by the user because we do not want
|
||||
* to keep Ans symbol in the calculation store. */
|
||||
PoincareHelpers::Serialize(input, m_inputText, sizeof(m_inputText));
|
||||
|
||||
Reference in New Issue
Block a user