mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: return pointer to dive_site in get_dive_site_*()
As a first step in removing dive-site uuids, change the interface of the get_dive_site_*() functions to return pointers instead of uuids. This makes code a bit more complicated in places where the uuid is extracted afterwards (needed NULL check). Nevertheless, these places should disappear once pointers instead of uuids are stored in the dive-structures. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4cea7b4901
commit
68961a169e
9 changed files with 68 additions and 77 deletions
|
|
@ -61,10 +61,10 @@ 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);
|
||||
uint32_t get_dive_site_uuid_by_name(const char *name, struct dive_site **dsp);
|
||||
uint32_t get_dive_site_uuid_by_gps(const location_t *, struct dive_site **dsp);
|
||||
uint32_t get_dive_site_uuid_by_gps_and_name(char *name, const location_t *);
|
||||
uint32_t get_dive_site_uuid_by_gps_proximity(const location_t *, int distance, struct dive_site **dsp);
|
||||
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 *);
|
||||
struct dive_site *get_dive_site_by_gps_proximity(const location_t *, int distance);
|
||||
bool dive_site_is_empty(struct dive_site *ds);
|
||||
void copy_dive_site_taxonomy(struct dive_site *orig, struct dive_site *copy);
|
||||
void copy_dive_site(struct dive_site *orig, struct dive_site *copy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue