summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-06-04 18:05:30 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-06-19 13:11:10 -0700
commitafd6c663469d6a9ae16c36e35ce87019bdb2c41c (patch)
tree5394fce76fff2d798dba82399c8dbd9e35c99f29 /core
parentaf5aa8a23dc66f7883989319949fc2b0255a0374 (diff)
downloadsubsurface-afd6c663469d6a9ae16c36e35ce87019bdb2c41c.tar.gz
Cleanup: remove unused function find_dive_including
Last caller was removed in 7eb422d98837b3cfb289a66fa0f3a8f78f222001. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/dive.c15
-rw-r--r--core/dive.h1
2 files changed, 0 insertions, 16 deletions
diff --git a/core/dive.c b/core/dive.c
index a54c3aa00..624aa8d00 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -3351,21 +3351,6 @@ timestamp_t dive_endtime(const struct dive *dive)
return dive->when + dive_totaltime(dive);
}
-struct dive *find_dive_including(timestamp_t when)
-{
- int i;
- struct dive *dive;
-
- /* binary search, anyone? Too lazy for now;
- * also we always use the duration from the first divecomputer
- * could this ever be a problem? */
- for_each_dive (i, dive) {
- if (dive->when <= when && when <= dive_endtime(dive))
- return dive;
- }
- return NULL;
-}
-
bool time_during_dive_with_offset(struct dive *dive, timestamp_t when, timestamp_t offset)
{
timestamp_t start = dive->when;
diff --git a/core/dive.h b/core/dive.h
index 042f825f4..e9bb926ae 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -292,7 +292,6 @@ extern location_t dive_get_gps_location(const struct dive *d);
extern int report_error(const char *fmt, ...);
extern void set_error_cb(void(*cb)(char *)); // Callback takes ownership of passed string
-extern struct dive *find_dive_including(timestamp_t when);
extern bool dive_within_time_range(struct dive *dive, timestamp_t when, timestamp_t offset);
extern bool time_during_dive_with_offset(struct dive *dive, timestamp_t when, timestamp_t offset);
struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset);