diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-11 15:00:15 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-06 13:58:09 -0700 |
commit | 2c4975f2ed728543d59300a622aa146fd94b4bd1 (patch) | |
tree | 5658d15b70690a7bc66bd213e32ad181d16717f1 /core/equipment.c | |
parent | fdca1303870ebeb0ea846984e0a9eb8804000390 (diff) | |
download | subsurface-2c4975f2ed728543d59300a622aa146fd94b4bd1.tar.gz |
cleanup: move copy_cylinders from dive.c to equipment.c
Since this doesn't touch struct dive, dive.c is not an appropriate
place for this function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/equipment.c')
-rw-r--r-- | core/equipment.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/equipment.c b/core/equipment.c index 1d701ae81..16d6185c1 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -42,6 +42,14 @@ void copy_weights(const struct weightsystem_table *s, struct weightsystem_table add_cloned_weightsystem(d, s->weightsystems[i]); } +void copy_cylinders(const struct cylinder_table *s, struct cylinder_table *d) +{ + int i; + clear_cylinder_table(d); + for (i = 0; i < s->nr; i++) + add_cloned_cylinder(d, s->cylinders[i]); +} + /* weightsystem table functions */ //static MAKE_GET_IDX(weightsystem_table, weightsystem_t, weightsystems) static MAKE_GROW_TABLE(weightsystem_table, weightsystem_t, weightsystems) |