diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/cylindermodel.cpp | 2 | ||||
-rw-r--r-- | qt-models/diveplannermodel.cpp | 4 | ||||
-rw-r--r-- | qt-models/divetripmodel.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index 5d697470f..dd9ac5e69 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -421,7 +421,7 @@ int CylindersModel::rowCount(const QModelIndex&) const void CylindersModel::add() { int row = rows; - cylinder_t cyl = { 0 }; + cylinder_t cyl = empty_cylinder; fill_default_cylinder(&displayed_dive, &cyl); cyl.start = cyl.type.workingpressure; cyl.manually_added = true; 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; diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 1d424b9f3..1cbc1932e 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -515,7 +515,7 @@ void processRangesZip(Vector1 &items1, Vector2 &items2, Predicate cond, Action a return 1; }, [&](Vector1 &v1, int from, int to) { // Action - return action(v1, items2, from, to, actItem); + return action(v1, items2, from, to, actItem); }); } @@ -653,7 +653,7 @@ QModelIndex DiveTripModelTree::parent(const QModelIndex &index) const } DiveTripModelTree::Item::Item(dive_trip *t, const QVector<dive *> &divesIn) : d_or_t{nullptr, t}, - dives(divesIn.toStdVector()), + dives(std::vector<dive *>(divesIn.begin(), divesIn.end())), shown(std::any_of(dives.begin(), dives.end(), [](dive *d){ return !d->hidden_by_filter; })) { } |