diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-01-06 19:00:20 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-10 02:37:03 +0900 |
commit | cef30619d0d7296e1730d87dae1c9712ac5cd822 (patch) | |
tree | 655e9c94f0272b38480b6fc6e5734388c5bc9408 /qt-models/divetripmodel.cpp | |
parent | 4e419f74456bc3ac04e8d8c7550153434e36f475 (diff) | |
download | subsurface-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/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; })) { } |