mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: use taxonomy_get_country() in get_dive_country()
get_dive_country() was essentially a reimplementation of taxonomy_get_country(). Let's just use the already existing function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
754b4a5c9d
commit
e5923a105a
1 changed files with 1 additions and 6 deletions
|
@ -3797,12 +3797,7 @@ struct dive_site *get_dive_site_for_dive(const struct dive *dive)
|
|||
const char *get_dive_country(const struct dive *dive)
|
||||
{
|
||||
struct dive_site *ds = dive->dive_site;
|
||||
if (ds) {
|
||||
int idx = taxonomy_index_for_category(&ds->taxonomy, TC_COUNTRY);
|
||||
if (idx >= 0)
|
||||
return ds->taxonomy.category[idx].value;
|
||||
}
|
||||
return NULL;
|
||||
return ds ? taxonomy_get_country(&ds->taxonomy) : NULL;
|
||||
}
|
||||
|
||||
const char *get_dive_location(const struct dive *dive)
|
||||
|
|
Loading…
Add table
Reference in a new issue