mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make find_next_visible_dive() member of dive_table
This function implicitely accessed the global divelog. To make that explicit make it a member of dive_table, such that the caller must access it via the global variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4afefb1b9b
commit
e9a57ac5f5
4 changed files with 8 additions and 10 deletions
|
@ -101,7 +101,7 @@ static void setClosestCurrentDive(timestamp_t when, const std::vector<dive *> &s
|
|||
// No selected dive is visible! Take the closest dive. Note, this might
|
||||
// return null, but that just means unsetting the current dive (as no
|
||||
// dive is visible anyway).
|
||||
current_dive = find_next_visible_dive(when);
|
||||
current_dive = divelog.dives.find_next_visible_dive(when);
|
||||
if (current_dive) {
|
||||
current_dive->selected = true;
|
||||
amount_selected++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue