mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
2feb7077f8
commit
c3614040d9
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue