mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
2df30a4144
commit
db4b972897
8 changed files with 15 additions and 35 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue