mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make get_dive_nr_at_idx() 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
cce5f5950c
commit
271df8962b
3 changed files with 7 additions and 14 deletions
|
@ -419,7 +419,7 @@ AddDive::AddDive(dive *d, bool autogroup, bool newNumber)
|
|||
|
||||
int idx = divelog.dives.get_insertion_index(divePtr.get());
|
||||
if (newNumber)
|
||||
divePtr->number = get_dive_nr_at_idx(idx);
|
||||
divePtr->number = divelog.dives.get_dive_nr_at_idx(idx);
|
||||
|
||||
divesToAdd.dives.push_back({ std::move(divePtr), trip, site });
|
||||
if (allocTrip)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue