summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-25 11:45:27 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-25 13:59:52 -0700
commit4aa571d5a09e7c114633dc046bb8a61044a05d63 (patch)
treeeb8a30aaa449fe80d322b8f370922f922dbb82dd /core
parent464dd93fe8266e3d0af706a6809f09611bd9f83c (diff)
downloadsubsurface-4aa571d5a09e7c114633dc046bb8a61044a05d63.tar.gz
cleanup: remove get_times() functions
The function 1) was misnamed: it determined the time of the first selcted dive. 2) had only one caller. 3) would crash if there was no selected dive. Let's just fold the functionality into the caller. It's a one-liner anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/dive.c12
-rw-r--r--core/dive.h2
2 files changed, 0 insertions, 14 deletions
diff --git a/core/dive.c b/core/dive.c
index 5bb406f08..0aa7a4324 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -3311,18 +3311,6 @@ bool time_during_dive_with_offset(const struct dive *dive, timestamp_t when, tim
return start - offset <= when && when <= end + offset;
}
-timestamp_t get_times()
-{
- int i;
- struct dive *dive;
-
- for_each_dive (i, dive) {
- if (dive->selected)
- break;
- }
- return dive->when;
-}
-
/* this sets a usually unused copy of the preferences with the units
* that were active the last time the dive list was saved to git storage
* (this isn't used in XML files); storing the unit preferences in the
diff --git a/core/dive.h b/core/dive.h
index 523d648bb..968c221ec 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -260,8 +260,6 @@ extern void subsurface_console_init(void);
extern void subsurface_console_exit(void);
extern bool subsurface_user_is_root(void);
-extern timestamp_t get_times();
-
extern struct dive *alloc_dive(void);
extern void free_dive(struct dive *);
extern void free_dive_dcs(struct divecomputer *dc);