From 4fe9b39cdbb5839830281820621059cefc26a03a Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 19 May 2019 18:40:04 +0200 Subject: Core: let count_divecomputers() operate on an arbitrary dive Currently, count_divecomputers only works on the current_dive. Instead, let it take a pointer to an arbitrary dive. This is in preparation for being smarter in the undo code concerning which dive computer to show on deletion. Signed-off-by: Berthold Stoeger --- core/dive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/dive.h') diff --git a/core/dive.h b/core/dive.h index 5efb24cca..2998ae9d6 100644 --- a/core/dive.h +++ b/core/dive.h @@ -435,7 +435,7 @@ 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 unsigned int count_divecomputers(void); +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