mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't add separate country field, use taxonomy
The more I looked at the code that added the country to the dive site, the more it seemed redundant given what we have with the taxonomy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
de10fd4021
commit
21d78121ad
8 changed files with 21 additions and 24 deletions
|
|
@ -205,7 +205,6 @@ uint32_t create_dive_site(const char *name, timestamp_t divetime)
|
|||
uint32_t uuid = create_divesite_uuid(name, divetime);
|
||||
struct dive_site *ds = alloc_or_get_dive_site(uuid);
|
||||
ds->name = copy_string(name);
|
||||
ds->country = NULL;
|
||||
return uuid;
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +239,6 @@ bool dive_site_is_empty(struct dive_site *ds)
|
|||
return same_string(ds->name, "") &&
|
||||
same_string(ds->description, "") &&
|
||||
same_string(ds->notes, "") &&
|
||||
same_string(ds->country, "") &&
|
||||
ds->latitude.udeg == 0 &&
|
||||
ds->longitude.udeg == 0;
|
||||
}
|
||||
|
|
@ -304,7 +302,6 @@ void merge_dive_site(struct dive_site *a, struct dive_site *b)
|
|||
merge_string(&a->name, &b->name);
|
||||
merge_string(&a->notes, &b->notes);
|
||||
merge_string(&a->description, &b->description);
|
||||
merge_string(&a->country, &b->country);
|
||||
|
||||
if (!a->taxonomy.category) {
|
||||
a->taxonomy = b->taxonomy;
|
||||
|
|
@ -325,7 +322,6 @@ void clear_dive_site(struct dive_site *ds)
|
|||
ds->longitude.udeg = 0;
|
||||
ds->uuid = 0;
|
||||
ds->taxonomy.nr = 0;
|
||||
ds->country = 0;
|
||||
free_taxonomy(&ds->taxonomy);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue