From ab99ca85f12b92ed55219c82ec2220aebfe1dda5 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 3 Nov 2019 23:14:35 +0100 Subject: 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 --- commands/command_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands') 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() -- cgit v1.2.3-70-g09d2