mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
2802d42969
commit
d1971a64f9
9 changed files with 22 additions and 22 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue