[shared] Create ExpiringPointer: in DEBUG, check that pointers to

memoized functions are not used when invalid
This commit is contained in:
Émilie Feral
2018-10-23 17:46:15 +02:00
parent 8e6cff9572
commit e8b58a2b5b
29 changed files with 108 additions and 49 deletions

View File

@@ -36,7 +36,7 @@ double IntegralGraphController::cursorNextStep(double x, int direction) {
return (direction > 0 ? x + m_graphRange->xGridUnit()/k_numberOfCursorStepsInGradUnit : x - m_graphRange->xGridUnit()/k_numberOfCursorStepsInGradUnit);
}
Layout IntegralGraphController::createFunctionLayout(StorageFunction * function) {
Layout IntegralGraphController::createFunctionLayout(ExpiringPointer<StorageFunction> function) {
constexpr size_t bufferSize = SymbolAbstract::k_maxNameSize+5; // f(x)dx
char buffer[bufferSize];
const char * dx = "dx";