diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-10 13:02:46 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-11-18 16:50:09 -0800 |
commit | 431b2bb84542d4f45952b48aa91231f979762e00 (patch) | |
tree | bc2b8037d6dbdf88630db7ca5cfc2d75f676fc0a | |
parent | 243962a67a41c71f39a098e8f18dafdcd9adb37e (diff) | |
download | subsurface-431b2bb84542d4f45952b48aa91231f979762e00.tar.gz |
Coding style: fix indentation in addDivesToTrip()
addDivesToTrip() had one level of indentation too much owing
to a copy-and-paste error. Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | qt-models/divetripmodel.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index b90c13aed..c6b4ae228 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -726,18 +726,18 @@ void addInBatches(Vector1 &v1, const Vector2 &v2, Comparator comp, Inserter inse void DiveTripModel::addDivesToTrip(int trip, const QVector<dive *> &dives) { - // Construct the parent index, ie. the index of the trip. - QModelIndex parent = createIndex(trip, 0, noParent); - - // Either this is outside of a trip or we're in list mode. - // Thus, add dives at the top-level in batches - addInBatches(items[trip].dives, dives, - [](dive *d, dive *d2) { return dive_less_than(d, d2); }, // comp - [&](std::vector<dive *> &items, const QVector<dive *> &dives, int idx, int from, int to) { // inserter - beginInsertRows(parent, idx, idx + to - from - 1); - items.insert(items.begin() + idx, dives.begin() + from, dives.begin() + to); - endInsertRows(); - }); + // Construct the parent index, ie. the index of the trip. + QModelIndex parent = createIndex(trip, 0, noParent); + + // Either this is outside of a trip or we're in list mode. + // Thus, add dives at the top-level in batches + addInBatches(items[trip].dives, dives, + [](dive *d, dive *d2) { return dive_less_than(d, d2); }, // comp + [&](std::vector<dive *> &items, const QVector<dive *> &dives, int idx, int from, int to) { // inserter + beginInsertRows(parent, idx, idx + to - from - 1); + items.insert(items.begin() + idx, dives.begin() + from, dives.begin() + to); + endInsertRows(); + }); } // This function is used to compare a dive to an arbitrary entry (dive or trip). |