aboutsummaryrefslogtreecommitdiffstats
path: root/core/divesite.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-23 13:29:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-29 00:09:31 +0000
commitd3a7c5448fe166444980ed41757c9e03d83ece2f (patch)
tree7a2a4f05b808705cd27845335876184f87243b5c /core/divesite.h
parentae6239bfec75df8a6795c2cc0017fcb0148e01e5 (diff)
downloadsubsurface-d3a7c5448fe166444980ed41757c9e03d83ece2f.tar.gz
Dive site: return pointer to dive_site in create_dive_site_*()
This changes more of the dive-site interface to return pointers instead of UUIDs. Currently, most call sites directly extract UUIDs afterwards. Ultimately, the UUIDs will be generally replaced by pointers, which will then simplify these callers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divesite.h')
-rw-r--r--core/divesite.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/divesite.h b/core/divesite.h
index d9e2881e4..0b21d69af 100644
--- a/core/divesite.h
+++ b/core/divesite.h
@@ -58,9 +58,9 @@ int nr_of_dives_at_dive_site(uint32_t uuid, bool select_only);
bool is_dive_site_used(uint32_t uuid, bool select_only);
void free_dive_site(struct dive_site *ds);
void delete_dive_site(uint32_t id);
-uint32_t create_dive_site(const char *name, timestamp_t divetime);
-uint32_t create_dive_site_from_current_dive(const char *name);
-uint32_t create_dive_site_with_gps(const char *name, const location_t *, timestamp_t divetime);
+struct dive_site *create_dive_site(const char *name, timestamp_t divetime);
+struct dive_site *create_dive_site_from_current_dive(const char *name);
+struct dive_site *create_dive_site_with_gps(const char *name, const location_t *, timestamp_t divetime);
struct dive_site *get_dive_site_by_name(const char *name);
struct dive_site *get_dive_site_by_gps(const location_t *);
struct dive_site *get_dive_site_by_gps_and_name(char *name, const location_t *);
@@ -71,7 +71,7 @@ void copy_dive_site(struct dive_site *orig, struct dive_site *copy);
void merge_dive_site(struct dive_site *a, struct dive_site *b);
void clear_dive_site(struct dive_site *ds);
unsigned int get_distance(const location_t *loc1, const location_t *loc2);
-uint32_t find_or_create_dive_site_with_name(const char *name, timestamp_t divetime);
+struct dive_site *find_or_create_dive_site_with_name(const char *name, timestamp_t divetime);
void merge_dive_sites(uint32_t ref, uint32_t *uuids, int count);
#ifdef __cplusplus