mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 1 additions and 3 deletions
|
@ -543,9 +543,7 @@ void DiveListView::mergeTripBelow()
|
||||||
void DiveListView::removeFromTrip()
|
void DiveListView::removeFromTrip()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct dive *d = (struct dive *) contextMenuIndex.data(DiveTripModel::DIVE_ROLE).value<void*>();
|
struct dive *d;
|
||||||
if (!d) // shouldn't happen as we only are setting up this action if this is a dive
|
|
||||||
return;
|
|
||||||
for_each_dive(i, d) {
|
for_each_dive(i, d) {
|
||||||
if (d->selected)
|
if (d->selected)
|
||||||
remove_dive_from_trip(d);
|
remove_dive_from_trip(d);
|
||||||
|
|
Loading…
Add table
Reference in a new issue