diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-10 21:59:51 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-11 20:34:29 -0800 |
commit | 33b8cf8a3694158a99ec74c4abde1cb53cd32356 (patch) | |
tree | 58f637344f67d89ed6b8580aa1b2b59ad2fc63e4 /qt-models/divetripmodel.cpp | |
parent | 50caf38694dec1765ee08f7fa72c867e5836073f (diff) | |
download | subsurface-33b8cf8a3694158a99ec74c4abde1cb53cd32356.tar.gz |
Cleanup: remove filterSelectedDives function in divetripmodel.cpp
The last users of the returned vector were removed in commit
e1abf9485cf59f1b8cb79d827fa386af48f095a4
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 1cbc1932e..66274cbec 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -1137,16 +1137,6 @@ void DiveTripModelTree::tripChanged(dive_trip *trip, TripField) dataChanged(createIndex(idx, 0, noParent), createIndex(idx, COLUMNS - 1, noParent)); } -static QVector<dive *> filterSelectedDives(const QVector<dive *> &dives) -{ - QVector<dive *> res; - res.reserve(dives.size()); - for (dive *d: dives) - if (d->selected) - res.append(d); - return res; -} - void DiveTripModelTree::divesMovedBetweenTrips(dive_trip *from, dive_trip *to, bool deleteFrom, bool createTo, const QVector<dive *> &dives) { // Move dives between trips. This is an "interesting" problem, as we might @@ -1163,7 +1153,6 @@ void DiveTripModelTree::divesMovedBetweenTrips(dive_trip *from, dive_trip *to, b // Cheating! // Unfortunately, removing the dives means that their selection is lost. // Thus, remember the selection and re-add it later. - QVector<dive *> selectedDives = filterSelectedDives(dives); divesAdded(to, createTo, dives); divesDeleted(from, deleteFrom, dives); } @@ -1186,7 +1175,6 @@ void DiveTripModelTree::divesTimeChangedTrip(dive_trip *trip, timestamp_t delta, // Cheating! // Unfortunately, removing the dives means that their selection is lost. // Thus, remember the selection and re-add it later. - QVector<dive *> selectedDives = filterSelectedDives(dives); divesDeleted(trip, false, dives); divesAdded(trip, false, dives); } @@ -1451,7 +1439,6 @@ void DiveTripModelList::divesTimeChanged(timestamp_t delta, const QVector<dive * std::sort(dives.begin(), dives.end(), dive_less_than); // See comment for DiveTripModelTree::divesTimeChanged above. - QVector<dive *> selectedDives = filterSelectedDives(dives); divesDeleted(nullptr, false, dives); divesAdded(nullptr, false, dives); } |