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>
This commit is contained in:
parent
4dc3061aa5
commit
ad6fab9fb0
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user