From 048cdcaa318f111e12d78c60927a0e2fc30eb1d6 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 6 Sep 2020 17:41:25 +0200 Subject: cleanup: remove count_divecomputers() function There is a number_of_computers() function which does the same thing with two exceptions: 1) checks for null-dive 2) returns an unsigned int Replace calls to count_divecomputers() by calls to number_of_computers(). In one case, the return type makes a different - add a cast to int there. Ultimately, we should probably change the dc_number to signed int throughout the code. Signed-off-by: Berthold Stoeger --- core/dive.h | 1 - 1 file changed, 1 deletion(-) (limited to 'core/dive.h') diff --git a/core/dive.h b/core/dive.h index 4f94dba6b..b29cf9857 100644 --- a/core/dive.h +++ b/core/dive.h @@ -248,7 +248,6 @@ extern struct divecomputer *get_dive_dc(struct dive *dive, int nr); extern timestamp_t dive_endtime(const struct dive *dive); extern struct dive *make_first_dc(const struct dive *d, int dc_number); -extern int count_divecomputers(const struct dive *d); extern struct dive *clone_delete_divecomputer(const struct dive *d, int dc_number); void split_divecomputer(const struct dive *src, int num, struct dive **out1, struct dive **out2); -- cgit v1.2.3-70-g09d2