mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[shared] StorageCartesianFunctionStore: fix moveMemoizedModel (confusion
between arguments)
This commit is contained in:
@@ -20,10 +20,10 @@ void StorageCartesianFunctionStore::setMemoizedModelAtIndex(int cacheIndex, Ion:
|
||||
m_functions[cacheIndex] = StorageCartesianFunction(record);
|
||||
}
|
||||
|
||||
void StorageCartesianFunctionStore::moveMemoizedModel(int previousIndex, int nextIndex) const {
|
||||
assert(nextIndex >= 0 && nextIndex < k_maxNumberOfMemoizedModels);
|
||||
void StorageCartesianFunctionStore::moveMemoizedModel(int newIndex, int previousIndex) const {
|
||||
assert(newIndex >= 0 && newIndex < k_maxNumberOfMemoizedModels);
|
||||
assert(previousIndex >= 0 && previousIndex < k_maxNumberOfMemoizedModels);
|
||||
m_functions[nextIndex] = m_functions[previousIndex];
|
||||
m_functions[newIndex] = m_functions[previousIndex];
|
||||
}
|
||||
|
||||
StorageExpressionModel * StorageCartesianFunctionStore::memoizedModelAtIndex(int cacheIndex) const {
|
||||
|
||||
@@ -18,7 +18,7 @@ private:
|
||||
Ion::Storage::Record::ErrorStatus addEmptyModel() override;
|
||||
const char * modelExtension() const override { return Shared::GlobalContext::funcExtension; }
|
||||
void setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record record) const override;
|
||||
void moveMemoizedModel(int previousIndex, int nextIndex) const override;
|
||||
void moveMemoizedModel(int newIndex, int previousIndex) const override;
|
||||
Shared::StorageExpressionModel * memoizedModelAtIndex(int cacheIndex) const override;
|
||||
mutable Shared::StorageCartesianFunction m_functions[k_maxNumberOfMemoizedModels];
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ private:
|
||||
mutable int m_firstMemoizedModelIndex;
|
||||
mutable uint32_t m_storageChecksum;
|
||||
virtual void setMemoizedModelAtIndex(int cacheIndex, Ion::Storage::Record) const = 0;
|
||||
virtual void moveMemoizedModel(int previousIndex, int nextIndex) const = 0;
|
||||
virtual void moveMemoizedModel(int newIndex, int previousIndex) const = 0;
|
||||
virtual StorageExpressionModel * memoizedModelAtIndex(int cacheIndex) const = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user