diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-05-22 22:11:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-22 14:40:49 -0700 |
commit | 9365061e2799439532f4de1084735a141924330f (patch) | |
tree | 236120a2a083f5116b8e262f55d25569a244d8f4 /core/dive.c | |
parent | 8f80129bac29227a03c35940af9d197ef0fa6398 (diff) | |
download | subsurface-9365061e2799439532f4de1084735a141924330f.tar.gz |
cleanup: remove unused function get_dive_n_near()
The last caller was removed in 7eb422d98837b3cfb289a66fa0f3a8f78f222001.
Since this is the only caller of dive_within_time_range(), remove that
function as well.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/core/dive.c b/core/dive.c index b64b3ff01..7b37eef38 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3401,28 +3401,6 @@ bool time_during_dive_with_offset(struct dive *dive, timestamp_t when, timestamp return start - offset <= when && when <= end + offset; } -bool dive_within_time_range(struct dive *dive, timestamp_t when, timestamp_t offset) -{ - timestamp_t start = dive->when; - timestamp_t end = dive_endtime(dive); - return when - offset <= start && end <= when + offset; -} - -/* find the n-th dive that is part of a group of dives within the offset around 'when'. - * How is that for a vague definition of what this function should do... */ -struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset) -{ - int i, j = 0; - struct dive *dive; - - for_each_dive (i, dive) { - if (dive_within_time_range(dive, when, offset)) - if (++j == n) - return dive; - } - return NULL; -} - timestamp_t get_times() { int i; |