core: move get_distance() from divesite.cpp to units.cpp

This gives the distance between to location_t objects. It is
unclear why this was in divesite.cpp.

Moreover pass by value, not raw pointer.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-11 15:18:37 +02:00 committed by bstoeger
parent 2de6f69c19
commit 7d7766be9a
9 changed files with 30 additions and 30 deletions

View file

@ -1197,7 +1197,7 @@ static void gps_in_dive(const char *buffer, struct dive *dive, struct parser_sta
parse_location(buffer, &location);
if (!ds) {
// check if we have a dive site within 20 meters of that gps fix
ds = state->log->sites->get_by_gps_proximity(&location, 20);
ds = state->log->sites->get_by_gps_proximity(location, 20);
if (ds) {
// found a site nearby; in case it turns out this one had a different name let's