mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
code cleanup: introduce empty_cylinder constant
This deals with the issue of initializing structs in C++. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4e419f7445
commit
cef30619d0
12 changed files with 18 additions and 16 deletions
|
@ -166,12 +166,12 @@ void DivePlannerPointsModel::setupCylinders()
|
|||
}
|
||||
}
|
||||
if (!empty_string(prefs.default_cylinder)) {
|
||||
cylinder_t cyl = { 0 };
|
||||
cylinder_t cyl = empty_cylinder;
|
||||
fill_default_cylinder(&displayed_dive, &cyl);
|
||||
cyl.start = cyl.type.workingpressure;
|
||||
add_to_cylinder_table(&displayed_dive.cylinders, 0, cyl);
|
||||
} else {
|
||||
cylinder_t cyl = { 0 };
|
||||
cylinder_t cyl = empty_cylinder;
|
||||
// roughly an AL80
|
||||
cyl.type.description = copy_qstring(tr("unknown"));
|
||||
cyl.type.size.mliter = 11100;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue