summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-06 19:00:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-10 02:37:03 +0900
commitcef30619d0d7296e1730d87dae1c9712ac5cd822 (patch)
tree655e9c94f0272b38480b6fc6e5734388c5bc9408 /qt-models/diveplannermodel.cpp
parent4e419f74456bc3ac04e8d8c7550153434e36f475 (diff)
downloadsubsurface-cef30619d0d7296e1730d87dae1c9712ac5cd822.tar.gz
code cleanup: introduce empty_cylinder constant
This deals with the issue of initializing structs in C++. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 56910a507..c19f9bc68 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -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;