From f3221c69653b5c97093fa04d38954ce8230f88f7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 28 Aug 2022 17:44:49 +0200 Subject: [PATCH] cleanup: remove unused function set_dive_nr_for_current_dive() Last caller was removed in a6fa6cdb41. Signed-off-by: Berthold Stoeger --- core/divelist.c | 9 --------- core/divelist.h | 1 - 2 files changed, 10 deletions(-) diff --git a/core/divelist.c b/core/divelist.c index 09e3f372a..c3385920d 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -1314,15 +1314,6 @@ int get_dive_nr_at_idx(int idx) return last_dive->number ? last_dive->number + 1 : 0; } -void set_dive_nr_for_current_dive() -{ - int selected_dive = get_divenr(current_dive); - if (dive_table.nr == 1) - current_dive->number = 1; - else if (selected_dive == dive_table.nr - 1 && get_dive(dive_table.nr - 2)->number) - current_dive->number = get_dive(dive_table.nr - 2)->number + 1; -} - static int min_datafile_version; int get_min_datafile_version() diff --git a/core/divelist.h b/core/divelist.h index ce062b515..e65e94dfc 100644 --- a/core/divelist.h +++ b/core/divelist.h @@ -53,7 +53,6 @@ extern void get_dive_gas(const struct dive *dive, int *o2_p, int *he_p, int *o2l extern int get_divenr(const struct dive *dive); extern int remove_dive(const struct dive *dive, struct dive_table *table); extern int get_dive_nr_at_idx(int idx); -extern void set_dive_nr_for_current_dive(); extern timestamp_t get_surface_interval(timestamp_t when); extern void delete_dive_from_table(struct dive_table *table, int idx); extern struct dive *find_next_visible_dive(timestamp_t when);