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
|
@ -57,7 +57,7 @@ struct dive_site *get_dive_site_by_gps(const location_t *loc, struct dive_site_t
|
|||
int i;
|
||||
struct dive_site *ds;
|
||||
for_each_dive_site (i, ds, ds_table) {
|
||||
if (same_location(loc, &ds->location))
|
||||
if (*loc == ds->location)
|
||||
return ds;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -71,7 +71,7 @@ struct dive_site *get_dive_site_by_gps_and_name(const std::string &name, const l
|
|||
int i;
|
||||
struct dive_site *ds;
|
||||
for_each_dive_site (i, ds, ds_table) {
|
||||
if (same_location(loc, &ds->location) && ds->name == name)
|
||||
if (*loc == ds->location && ds->name == name)
|
||||
return ds;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -273,7 +273,7 @@ static void merge_string(std::string &a, const std::string &b)
|
|||
static bool same_dive_site(const struct dive_site *a, const struct dive_site *b)
|
||||
{
|
||||
return a->name == b->name
|
||||
&& same_location(&a->location, &b->location)
|
||||
&& a->location == b->location
|
||||
&& a->description == b->description
|
||||
&& a->notes == b->notes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue