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:
Berthold Stoeger 2024-05-13 06:17:07 +02:00 committed by bstoeger
parent 90d5bab4e9
commit 6e352d5281
9 changed files with 16 additions and 22 deletions

View file

@ -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();