core: remove accessor get_dive_site_for_dive()

This function does nothing at all, callers may just access
dive::dive_site directly.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 18:36:29 +02:00 committed by bstoeger
parent 718523e01d
commit 731052c776
10 changed files with 11 additions and 17 deletions

View file

@ -135,7 +135,7 @@ void MapWidgetHelper::selectedLocationChanged(struct dive_site *ds_in)
QGeoCoordinate locationCoord = location->coordinate;
for (auto [idx, dive]: enumerated_range(divelog.dives)) {
struct dive_site *ds = get_dive_site_for_dive(dive.get());
struct dive_site *ds = dive->dive_site;
if (!ds || !ds->has_gps_location())
continue;
#ifndef SUBSURFACE_MOBILE
@ -163,7 +163,7 @@ void MapWidgetHelper::selectVisibleLocations()
{
QList<int> selectedDiveIds;
for (auto [idx, dive]: enumerated_range(divelog.dives)) {
struct dive_site *ds = get_dive_site_for_dive(dive.get());
struct dive_site *ds = dive->dive_site;
if (!ds || ds->has_gps_location())
continue;
const qreal latitude = ds->location.lat.udeg * 0.000001;