mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: add dive site ref-counting
Instead of setting dive->dive_site directly, call the add_dive_to_dive_site() and unregister_dive_from_dive_site() functions. In the parser this turned out to be a bit tricky. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
c22fd9f4fd
commit
e2df38d868
19 changed files with 121 additions and 75 deletions
|
|
@ -538,7 +538,7 @@ extern unsigned int dc_airtemp(const struct divecomputer *dc);
|
|||
extern unsigned int dc_watertemp(const struct divecomputer *dc);
|
||||
extern int split_dive(const struct dive *dive, struct dive **new1, struct dive **new2);
|
||||
extern int split_dive_at_time(const struct dive *dive, duration_t time, struct dive **new1, struct dive **new2);
|
||||
extern struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset, bool prefer_downloaded, struct dive_trip **trip);
|
||||
extern struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset, bool prefer_downloaded, struct dive_trip **trip, struct dive_site **site);
|
||||
extern struct dive *try_to_merge(struct dive *a, struct dive *b, bool prefer_downloaded);
|
||||
extern struct event *clone_event(const struct event *src_ev);
|
||||
extern void copy_events(const struct divecomputer *s, struct divecomputer *d);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue