diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-03 23:14:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-05 10:14:25 -0800 |
commit | ab99ca85f12b92ed55219c82ec2220aebfe1dda5 (patch) | |
tree | 6d6710368d194a97465b63cc81220b0557d68917 /commands/command_edit.cpp | |
parent | dc67876c7955b21f969545eee6f3ae3bdb550787 (diff) | |
download | subsurface-ab99ca85f12b92ed55219c82ec2220aebfe1dda5.tar.gz |
Cleanup: use free_weightsystem function instead of explicit free
Instead of freeing internal data of the weightsystem structure,
call the free_weightsystem function (which has to be made extern
at first). This makes things more future-proof, should the
weightsystem struct ever be extended.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command_edit.cpp')
-rw-r--r-- | commands/command_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index d0d9fc087..61b2f0d7a 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -1031,7 +1031,7 @@ RemoveWeight::RemoveWeight(int index, bool currentDiveOnly) : RemoveWeight::~RemoveWeight() { - free((void *)ws.description); + free_weightsystem(ws); } bool RemoveWeight::workToBeDone() |