mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move invalidate_dive_cache() to struct dive
Seems natural in a C++ code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1b593dc56c
commit
72bb38601d
11 changed files with 42 additions and 44 deletions
|
@ -239,7 +239,7 @@ static void renumberDives(QVector<QPair<dive *, int>> &divesToRenumber)
|
|||
continue;
|
||||
std::swap(d->number, pair.second);
|
||||
dives.push_back(d);
|
||||
invalidate_dive_cache(d);
|
||||
d->invalidate_cache();
|
||||
}
|
||||
|
||||
// Send signals.
|
||||
|
@ -268,7 +268,7 @@ static std::unique_ptr<dive_trip> moveDiveToTrip(DiveToTrip &diveToTrip)
|
|||
std::swap(trip, diveToTrip.trip);
|
||||
if (trip)
|
||||
trip->add_dive(diveToTrip.dive);
|
||||
invalidate_dive_cache(diveToTrip.dive); // Ensure that dive is written in git_save()
|
||||
diveToTrip.dive->invalidate_cache(); // Ensure that dive is written in git_save()
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue