diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-05-19 18:28:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-20 21:23:16 -0700 |
commit | ac590235c94fc2feb1f35a5cd290ea87f1a92044 (patch) | |
tree | 3de6a586c8c185c270b20f7034b326e3aa561cd8 /core | |
parent | 879f52180c077e924c7e44eb4c38017606df2834 (diff) | |
download | subsurface-ac590235c94fc2feb1f35a5cd290ea87f1a92044.tar.gz |
Cleanup: rename clone_dive() to move_dive()
This function clones a dive and clear out the old dive. This
corresponds to move semantics. Name the function accordingly.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/dive.c | 2 | ||||
-rw-r--r-- | core/dive.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/dive.c b/core/dive.c index b8162edd0..2b3b7ef62 100644 --- a/core/dive.c +++ b/core/dive.c @@ -637,7 +637,7 @@ static void copy_dive_onedc(const struct dive *s, const struct divecomputer *sdc * this is specifically so we can create a dive in the displayed_dive and then * add it to the divelist. * Note the difference to copy_dive() / clean_dive() */ -struct dive *clone_dive(struct dive *s) +struct dive *move_dive(struct dive *s) { struct dive *dive = alloc_dive(); *dive = *s; // so all the pointers in dive point to the things s pointed to diff --git a/core/dive.h b/core/dive.h index e26e0e02e..5efb24cca 100644 --- a/core/dive.h +++ b/core/dive.h @@ -517,7 +517,7 @@ extern void record_dive(struct dive *dive); extern void clear_dive(struct dive *dive); extern void copy_dive(const struct dive *s, struct dive *d); extern void selective_copy_dive(const struct dive *s, struct dive *d, struct dive_components what, bool clear); -extern struct dive *clone_dive(struct dive *s); +extern struct dive *move_dive(struct dive *s); extern void alloc_samples(struct divecomputer *dc, int num); extern void free_samples(struct divecomputer *dc); |