diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-01-06 12:11:04 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-10 02:37:03 +0900 |
commit | c3614040d94051d4d6702bbf02239e055de8da67 (patch) | |
tree | 38b97f7d2fe8fbeea98489b0202a8207fb98e354 /commands | |
parent | 2feb7077f89ad59c63ae4119717f2717c949297a (diff) | |
download | subsurface-c3614040d94051d4d6702bbf02239e055de8da67.tar.gz |
code cleanup: ensure all fields are initialized
In a total abundance of caution, make sure we don't exit the constructor
leaving fields uninitialized.
Fixes CID 351437
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/command_edit.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index 31ca4ea23..89e10b000 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -910,10 +910,16 @@ void PasteDives::redo() undo(); } -// ***** Paste ***** +// ***** ReplanDive ***** ReplanDive::ReplanDive(dive *source, bool edit_profile) : d(current_dive), + when(0), + maxdepth({0}), + meandepth({0}), dc({ 0 }), - notes(nullptr) + notes(nullptr), + surface_pressure({0}), + duration({0}), + salinity(0) { memset(&cylinders, 0, sizeof(cylinders)); if (!d) |