From dc67876c7955b21f969545eee6f3ae3bdb550787 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 3 Nov 2019 23:08:32 +0100 Subject: Cleanup: introduce empty_weightsystem constant To make things more future-proof, introduce an empty_weightsystem constant. Replace explicit aggragate initialization of empty weightsystems by this constant. Signed-off-by: Berthold Stoeger --- qt-models/weightmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-models') diff --git a/qt-models/weightmodel.cpp b/qt-models/weightmodel.cpp index c8903d069..087d877ab 100644 --- a/qt-models/weightmodel.cpp +++ b/qt-models/weightmodel.cpp @@ -23,7 +23,7 @@ weightsystem_t WeightModel::weightSystemAt(const QModelIndex &index) const int row = index.row(); if (row < 0 || row >= d->weightsystems.nr) { qWarning("WeightModel: Accessing invalid weightsystem %d (of %d)", row, d->weightsystems.nr); - return { { 0 }, nullptr }; + return empty_weightsystem; } return d->weightsystems.weightsystems[index.row()]; } -- cgit v1.2.3-70-g09d2