diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-24 10:11:07 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-09 20:58:04 -0800 |
commit | d1971a64f954b001729a0270e2f28bf8fa3f1a4a (patch) | |
tree | 2c00c5d04591e01ac3a4b78ea68fb95de08ce19f /desktop-widgets/command_divelist.cpp | |
parent | 2802d4296960eb6ad76292baa105075c5427ea67 (diff) | |
download | subsurface-d1971a64f954b001729a0270e2f28bf8fa3f1a4a.tar.gz |
Core: Rename functions to more generic names
Rename
- dive_get_insertion_index() -> dive_table_get_insertion_index()
- unregister_dive_from_table() -> remove_from_dive_table()
- get_idx_in_table() -> get_idx_in_dive_table()
- sort_table() -> sort_dive_table()
This will make it more straight-forward to generate these functions
from macros.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/command_divelist.cpp')
-rw-r--r-- | desktop-widgets/command_divelist.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/command_divelist.cpp b/desktop-widgets/command_divelist.cpp index b5cbc12ee..5e3f30ce2 100644 --- a/desktop-widgets/command_divelist.cpp +++ b/desktop-widgets/command_divelist.cpp @@ -511,7 +511,7 @@ AddDive::AddDive(dive *d, bool autogroup, bool newNumber) allocTrip.reset(trip); } - int idx = dive_get_insertion_index(&dive_table, divePtr.get()); + int idx = dive_table_get_insertion_index(&dive_table, divePtr.get()); if (newNumber) divePtr->number = get_dive_nr_at_idx(idx); @@ -603,7 +603,7 @@ void ShiftTime::redoit() d->when += timeChanged; // Changing times may have unsorted the dive table - sort_table(&dive_table); + sort_dive_table(&dive_table); // We send one time changed signal per trip (see comments in DiveListNotifier.h). // Therefore, collect all dives in an array and sort by trip. @@ -615,7 +615,7 @@ void ShiftTime::redoit() // Send signals and sort tables. processByTrip(dives, [&](dive_trip *trip, const QVector<dive *> &divesInTrip) { if (trip) - sort_table(&trip->dives); // Keep the trip-table in order + sort_dive_table(&trip->dives); // Keep the trip-table in order emit diveListNotifier.divesTimeChanged(trip, timeChanged, divesInTrip); }); |