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

@ -475,7 +475,7 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
if (dive_site_has_gps_location(ds) && currentDiveHasGPS) {
// so we are showing a completion and both the current dive site and the completion
// have a GPS fix... so let's show the distance
if (same_location(&ds->location, &currentLocation)) {
if (ds->location == currentLocation) {
bottomText += tr(" (same GPS fix)");
} else {
int distanceMeters = get_distance(&ds->location, &currentLocation);