mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move freestanding functions into divelog class
There were only two of them, from the time C-code had to access the divelog: clear_divelog() and delete_single_dive(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
90d5bab4e9
commit
6e352d5281
9 changed files with 16 additions and 22 deletions
|
@ -976,7 +976,7 @@ void add_imported_dives(struct divelog *import_log, int flags)
|
|||
/* Remove old dives */
|
||||
for (i = 0; i < dives_to_remove.nr; i++) {
|
||||
idx = get_divenr(dives_to_remove.dives[i]);
|
||||
delete_single_dive(&divelog, idx);
|
||||
divelog.delete_single_dive(idx);
|
||||
}
|
||||
dives_to_remove.nr = 0;
|
||||
|
||||
|
@ -1272,7 +1272,7 @@ void clear_dive_file_data()
|
|||
select_single_dive(NULL); // This is propagated up to the UI and clears all the information.
|
||||
|
||||
current_dive = NULL;
|
||||
clear_divelog(&divelog);
|
||||
divelog.clear();
|
||||
|
||||
clear_event_types();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue