[apps/shared] ExpressionModelHandle: specify the symbol that is turned

into Unknown X in Derived classes
This commit is contained in:
Émilie Feral
2019-02-22 14:10:59 +01:00
parent 0f37ee25f7
commit 64978202b4
13 changed files with 18 additions and 16 deletions

View File

@@ -90,8 +90,8 @@ Ion::Storage::Record::ErrorStatus ExpressionModelHandle::setContent(const char *
if (c && *c != 0) {
// Compute the expression to store, without replacing symbols
expressionToStore = Expression::Parse(c);
if (!expressionToStore.isUninitialized()) {
expressionToStore = expressionToStore.replaceUnknown(Symbol::Builder('x')); //TODO Beware of non x unknowns! (for instance whe sequences are in the storage)
if (!expressionToStore.isUninitialized() && symbol() != 0) {
expressionToStore = expressionToStore.replaceUnknown(Symbol::Builder(symbol()));
}
}
return setExpressionContent(expressionToStore);