core: replace same_location by operator==()

And operator!=() in the negative case.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-04 23:20:53 +02:00 committed by bstoeger
parent 2df30a4144
commit db4b972897
8 changed files with 15 additions and 35 deletions

View file

@ -1209,7 +1209,7 @@ static void gps_in_dive(const char *buffer, struct dive *dive, struct parser_sta
add_dive_to_dive_site(dive, ds);
} else {
if (dive_site_has_gps_location(ds) &&
has_location(&location) && !same_location(&ds->location, &location)) {
has_location(&location) && ds->location != location) {
// Houston, we have a problem
report_info("dive site uuid in dive, but gps location (%10.6f/%10.6f) different from dive location (%10.6f/%10.6f)",
ds->location.lat.udeg / 1000000.0, ds->location.lon.udeg / 1000000.0,