mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
cleanup: remove dead code from delete_divecomputer()
delete_divecomputer had legacy code, which 1) invalidated the git dive cache 2) made sure that the dive computer was not displayed anymore However, both callers called on a freshly copied dive, which has its dive cache invalidated in copy_dive() and can't be the currently displayed dive. Therefore, this code is dead code and can be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
048cdcaa31
commit
0a747608b1
1 changed files with 0 additions and 6 deletions
|
@ -3560,12 +3560,6 @@ static void delete_divecomputer(struct dive *d, int num)
|
|||
free_dc(dc);
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is the currently displayed dive, we might have to adjust
|
||||
* the currently displayed dive computer. */
|
||||
if (d == current_dive && dc_number >= number_of_computers(d))
|
||||
dc_number--;
|
||||
invalidate_dive_cache(d);
|
||||
}
|
||||
|
||||
/* Clone a dive and delete goven dive computer */
|
||||
|
|
Loading…
Reference in a new issue