core: move divesite_has_gps_information() to struct dive_site

Seems logical in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 17:38:36 +02:00 committed by bstoeger
parent c812dd140b
commit 0aa4efb3d9
14 changed files with 20 additions and 21 deletions

View file

@ -2531,14 +2531,9 @@ const struct divecomputer *get_dive_dc(const struct dive *dive, int nr)
return get_dive_dc((struct dive *)dive, nr);
}
bool dive_site_has_gps_location(const struct dive_site *ds)
{
return ds && has_location(&ds->location);
}
bool dive::dive_has_gps_location() const
{
return dive_site && dive_site_has_gps_location(dive_site);
return dive_site && dive_site->has_gps_location();
}
/* Extract GPS location of a dive computer stored in the GPS1