summaryrefslogtreecommitdiffstats
path: root/core/taxonomy.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-09-06 13:42:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-06 12:59:54 -0700
commit1f1fd78f785e68d2dad8f9de8e9d313c8e91d485 (patch)
treed35aa040fe70c09d735e295a1007f62df1171380 /core/taxonomy.h
parente5923a105a4faafa872c7d3b33c6d74f49ed7fe0 (diff)
downloadsubsurface-1f1fd78f785e68d2dad8f9de8e9d313c8e91d485.tar.gz
cleanup: create taxonomy_get_value() function
This is the counter-part to taxonomy_set_value(). Let taxonomy_get_country() be the first user of the function. If a category doesn't exist, return NULL. Small addition: make taxonomy_get_countr() take a const argument. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/taxonomy.h')
-rw-r--r--core/taxonomy.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/taxonomy.h b/core/taxonomy.h
index 84caa5baa..01a273053 100644
--- a/core/taxonomy.h
+++ b/core/taxonomy.h
@@ -42,7 +42,8 @@ struct taxonomy_data {
void free_taxonomy(struct taxonomy_data *t);
void copy_taxonomy(const struct taxonomy_data *orig, struct taxonomy_data *copy);
int taxonomy_index_for_category(const struct taxonomy_data *t, enum taxonomy_category cat);
-const char *taxonomy_get_country(struct taxonomy_data *t);
+const char *taxonomy_get_value(const struct taxonomy_data *t, enum taxonomy_category cat);
+const char *taxonomy_get_country(const struct taxonomy_data *t);
void taxonomy_set_category(struct taxonomy_data *t, enum taxonomy_category category, const char *value, enum taxonomy_origin origin);
void taxonomy_set_country(struct taxonomy_data *t, const char *country, enum taxonomy_origin origin);