From 2cfb35b6d7b5bb7bb7275f078bf2aff959e6ecef Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 3 Nov 2019 15:25:23 +0100 Subject: Cleanup: return value type from WeightModel::weightSystemAt() There is only one caller of WeightModel::weightSystemAt() and that certainly does not need a pointer into the weightsystem-table of the current dive. Return a value type instead of a pointer. This allows us to mark WeightModel::weightSystemAt() as const and use it from WeightModel::data(). Slightly cleaner code. Signed-off-by: Berthold Stoeger --- qt-models/weightmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-models/weightmodel.h') diff --git a/qt-models/weightmodel.h b/qt-models/weightmodel.h index a61217379..2e5a190ba 100644 --- a/qt-models/weightmodel.h +++ b/qt-models/weightmodel.h @@ -25,7 +25,7 @@ public: void passInData(const QModelIndex &index, const QVariant &value); void clear(); void updateDive(dive *d); - weightsystem_t *weightSystemAt(const QModelIndex &index); + weightsystem_t weightSystemAt(const QModelIndex &index); bool changed; public -- cgit v1.2.3-70-g09d2