From 28234ec58dacc9a9a5bf2966319346b277ff9199 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 4 Feb 2019 21:59:43 +0100 Subject: [PATCH] Cleanup: remove unused function create_dive_site_from_current_dive() The last caller was removed in 11a211fb02ad5443342d91b6967f150cb4f6d34f Signed-off-by: Berthold Stoeger --- core/divesite.c | 13 ------------- core/divesite.h | 1 - 2 files changed, 14 deletions(-) diff --git a/core/divesite.c b/core/divesite.c index 376321189..f81d6abf6 100644 --- a/core/divesite.c +++ b/core/divesite.c @@ -214,19 +214,6 @@ struct dive_site *create_dive_site(const char *name, timestamp_t divetime) return ds; } -/* same as before, but with current time if no current_dive is present */ -struct dive_site *create_dive_site_from_current_dive(const char *name) -{ - if (current_dive != NULL) { - return create_dive_site(name, current_dive->when); - } else { - timestamp_t when; - time_t now = time(0); - when = utc_mktime(localtime(&now)); - return create_dive_site(name, when); - } -} - /* same as before, but with GPS data */ struct dive_site *create_dive_site_with_gps(const char *name, const location_t *loc, timestamp_t divetime) { diff --git a/core/divesite.h b/core/divesite.h index 1cb0cbeff..a7dca6b0f 100644 --- a/core/divesite.h +++ b/core/divesite.h @@ -59,7 +59,6 @@ bool is_dive_site_used(struct dive_site *ds, bool select_only); void free_dive_site(struct dive_site *ds); void delete_dive_site(struct dive_site *ds); struct dive_site *create_dive_site(const char *name, timestamp_t divetime); -struct dive_site *create_dive_site_from_current_dive(const char *name); struct dive_site *create_dive_site_with_gps(const char *name, const location_t *, timestamp_t divetime); struct dive_site *get_dive_site_by_name(const char *name); struct dive_site *get_dive_site_by_gps(const location_t *);