aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/weightmodel.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-03 23:08:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 10:14:25 -0800
commitdc67876c7955b21f969545eee6f3ae3bdb550787 (patch)
treeea9fd130fa10807410a7376799f03f46a2fbc64b /qt-models/weightmodel.cpp
parent92b833a7d85f7d361f2b198782bb093c300ed59a (diff)
downloadsubsurface-dc67876c7955b21f969545eee6f3ae3bdb550787.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/weightmodel.cpp')
-rw-r--r--qt-models/weightmodel.cpp2
1 files changed, 1 insertions, 1 deletions
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()];
}