core: make calculate_cns() member of dive_table

This function implicitely accessed the global divelog. To make
that explicit make it a member of dive_table, such that the
caller must access it via the global variable.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-18 22:23:57 +02:00 committed by bstoeger
parent f3b8e3c4aa
commit b34116e2e2
8 changed files with 68 additions and 67 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) {
update_cylinder_related_info(d.get());
divelog.dives.update_cylinder_related_info(d.get());
if (d->hidden_by_filter)
continue;
dive_trip *trip = d->divetrip;