[poincare] Context::expressionForSymbol takes a boolean notifying that

we want a copy or not
This commit is contained in:
Émilie Feral
2018-11-16 16:57:25 +01:00
parent b44c5e6d05
commit e80512f362
18 changed files with 35 additions and 35 deletions

View File

@@ -9,7 +9,7 @@ using namespace Shared;
namespace Regression {
const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & symbol) {
const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & symbol, bool clone) {
if (symbol.type() == ExpressionNode::Type::Symbol && Symbol::isRegressionSymbol(symbol.name())) {
const char * seriesName = symbol.name();
assert(strlen(seriesName) == 2);
@@ -24,7 +24,7 @@ const Expression RegressionContext::expressionForSymbol(const SymbolAbstract & s
assert(m_seriesPairIndex < m_store->numberOfPairsOfSeries(series));
return Float<double>(m_store->get(series, storeI, m_seriesPairIndex));
} else {
return m_parentContext->expressionForSymbol(symbol);
return m_parentContext->expressionForSymbol(symbol, clone);
}
}