core: move fixup_dive() to struct dive_table

This accesses the global dive_table, so make this explicit.

Since force_fixup_dive() and default_dive() use fixup_dive(),
also move them to struct dive_table.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-23 14:20:59 +02:00 committed by bstoeger
parent d81ca005ab
commit a2903b31a7
12 changed files with 233 additions and 228 deletions

View file

@ -708,7 +708,7 @@ void DiveTripModelTree::populate()
uiNotification(QObject::tr("populate data model"));
uiNotification(QObject::tr("start processing"));
for (auto &d: divelog.dives) {
divelog.dives.update_cylinder_related_info(d.get());
divelog.dives.update_cylinder_related_info(*d);
if (d->hidden_by_filter)
continue;
dive_trip *trip = d->divetrip;