[shared] Change name: StorageExpressionModel::expressionWithSymbol -->

expressionClone
This commit is contained in:
Émilie Feral
2018-11-16 16:41:47 +01:00
parent 90befab6ce
commit b44c5e6d05
3 changed files with 5 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ Poincare::Expression GlobalContext::ExpressionFromFunctionRecord(Ion::Storage::R
/* An function record value has metadata before the expression. To get the
* expression, use the function record handle. */
StorageCartesianFunction f = StorageCartesianFunction(record);
return f.expressionWithSymbol();
return f.expressionClone();
}
void GlobalContext::DestroyRecordsBaseNamedWithoutExtension(const char * baseName, const char * extension) {

View File

@@ -20,7 +20,7 @@ StorageExpressionModel::StorageExpressionModel(Storage::Record record) :
}
void StorageExpressionModel::text(char * buffer, size_t bufferSize) const {
Expression e = expressionWithSymbol();
Expression e = expressionClone();
if (e.isUninitialized() && bufferSize > 0) {
buffer[0] = 0;
} else {
@@ -44,7 +44,7 @@ Expression StorageExpressionModel::expressionReduced(Poincare::Context * context
return m_expression;
}
Expression StorageExpressionModel::expressionWithSymbol() const {
Expression StorageExpressionModel::expressionClone() const {
assert(!isNull());
Ion::Storage::Record::Data recordData = value();
/* A new Expression has to be created at each call (because it might be tempered with after calling) */
@@ -53,7 +53,7 @@ Expression StorageExpressionModel::expressionWithSymbol() const {
Layout StorageExpressionModel::layout() {
if (m_layout.isUninitialized()) {
m_layout = PoincareHelpers::CreateLayout(expressionWithSymbol());
m_layout = PoincareHelpers::CreateLayout(expressionClone());
if (m_layout.isUninitialized()) {
m_layout = HorizontalLayout();
}

View File

@@ -16,7 +16,7 @@ public:
StorageExpressionModel(Ion::Storage::Record record);
void text(char * buffer, size_t bufferSize) const;
Poincare::Expression expressionReduced(Poincare::Context * context) const;
Poincare::Expression expressionWithSymbol() const;
Poincare::Expression expressionClone() const;
Poincare::Layout layout();
/* TODO This comment will be true when Sequence inherits from this class
* Here, isDefined is the exact contrary of isEmpty. However, for Sequence