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

@ -138,9 +138,14 @@ static inline bool has_location(const location_t *loc)
return loc->lat.udeg || loc->lon.udeg;
}
static inline bool same_location(const location_t *a, const location_t *b)
static inline bool operator==(const location_t &a, const location_t &b)
{
return (a->lat.udeg == b->lat.udeg) && (a->lon.udeg == b->lon.udeg);
return (a.lat.udeg == b.lat.udeg) && (a.lon.udeg == b.lon.udeg);
}
static inline bool operator!=(const location_t &a, const location_t &b)
{
return !(a == b);
}
static inline location_t create_location(double lat, double lon)