From 35f20c4312ee3188aed1256a9d802ee1aa595061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Mon, 6 Jul 2020 16:35:35 +0200 Subject: [PATCH] [apps/calculation] Comment possible failed height computation --- apps/calculation/history_controller.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/calculation/history_controller.cpp b/apps/calculation/history_controller.cpp index 667c8b14c..e09cac524 100644 --- a/apps/calculation/history_controller.cpp +++ b/apps/calculation/history_controller.cpp @@ -208,6 +208,10 @@ KDCoordinate HistoryController::rowHeight(int j) { result = HistoryViewCell::Height(calculation.pointer(), expanded); calculation->setMemoizedHeight(expanded, result); } + /* We might want to put an assertion here to check the memoization: + * assert(result == HistoryViewCell::Height(calculation.pointer(), expanded)); + * However, Height might fail due to pool memory exhaustion, in which case the + * assertion fails even if "result" had the right value. */ return result; }