From 431b2bb84542d4f45952b48aa91231f979762e00 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 10 Nov 2018 13:02:46 +0100 Subject: 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 --- qt-models/divetripmodel.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'qt-models') 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 &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 &items, const QVector &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 &items, const QVector &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). -- cgit v1.2.3-70-g09d2