mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[apps] The storage keeps a function's reduced expression, not a text
This commit is contained in:
@@ -9,15 +9,15 @@ namespace Shared {
|
||||
|
||||
uint32_t StorageFunction::checksum() {
|
||||
char data[k_dataLengthInBytes/sizeof(char)] = {};
|
||||
strlcpy(data, text(), TextField::maxBufferSize());
|
||||
data[k_dataLengthInBytes-2] = m_name != nullptr ? m_name[0] : 0;
|
||||
data[k_dataLengthInBytes-1] = m_active ? 1 : 0;
|
||||
text(data, TextField::maxBufferSize());
|
||||
data[k_dataLengthInBytes-2] = m_name != nullptr ? m_name[0] : 0; //TODO
|
||||
data[k_dataLengthInBytes-1] = m_active ? 1 : 0; //TODO
|
||||
return Ion::crc32((uint32_t *)data, k_dataLengthInBytes/sizeof(uint32_t));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T StorageFunction::templatedApproximateAtAbscissa(T x, Poincare::Context * context) const {
|
||||
return expression(context).approximateWithValueForSymbol(symbol(), x, *context, Preferences::sharedPreferences()->angleUnit());
|
||||
return reducedExpression(context).approximateWithValueForSymbol(symbol(), x, *context, Preferences::sharedPreferences()->angleUnit());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user