mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
UI restructure: add clone_dive helper
This is kind of the inverse to copy_dive(). Instead of duplicating all the data that the dive points to, it moves it to a new struct dive and zeroes out the old one so there are no two sets of pointers to these data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b1b2bc919
commit
47f9f59c1a
2 changed files with 16 additions and 0 deletions
1
dive.h
1
dive.h
|
@ -605,6 +605,7 @@ extern struct dive *alloc_dive(void);
|
|||
extern void record_dive(struct dive *dive);
|
||||
extern void clear_dive(struct dive *dive);
|
||||
extern void copy_dive(struct dive *s, struct dive *d);
|
||||
extern struct dive *clone_dive(struct dive *s);
|
||||
|
||||
extern struct sample *prepare_sample(struct divecomputer *dc);
|
||||
extern void finish_sample(struct divecomputer *dc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue