diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-08 06:05:54 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-08 06:05:54 +0100 |
commit | ad6fab9fb0ba85b3a1f7af28c55248c6230b3f88 (patch) | |
tree | de20e81d4bb8456c45573a14625c349207eec1b0 /qt-ui/divelistview.cpp | |
parent | 4dc3061aa58b25bd01c215777531a8801b151e93 (diff) | |
download | subsurface-ad6fab9fb0ba85b3a1f7af28c55248c6230b3f88.tar.gz |
Remove pointless code
When removing the selected dives from their trips, it makes no sense to
check if the pointer was actually pointing at a valid dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 422d1d21c..a1c4cf7fc 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -543,9 +543,7 @@ void DiveListView::mergeTripBelow() void DiveListView::removeFromTrip() { int i; - struct dive *d = (struct dive *) contextMenuIndex.data(DiveTripModel::DIVE_ROLE).value<void*>(); - if (!d) // shouldn't happen as we only are setting up this action if this is a dive - return; + struct dive *d; for_each_dive(i, d) { if (d->selected) remove_dive_from_trip(d); |