diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-13 11:52:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-13 21:41:41 -0400 |
commit | 8815f77ea086ba474df051144098b80739a0f3ae (patch) | |
tree | cd4546081961c4734ca850d72ce8c2f62ac91dc9 /core/taxonomy.h | |
parent | 5d3967ce846ed4876abeb43ebe2d919064050ed6 (diff) | |
download | subsurface-8815f77ea086ba474df051144098b80739a0f3ae.tar.gz |
Dive site: use own copy of taxonomy in dive-site-edit widget
The dive-site-edit widget uses a copy of the to-be-edited site
to compare with old values. Generally, this seems overkill
(the original dive-site can be used for such a comparison).
But one place where it can't simply be removed is the taxonomy,
because the widget needs a place to store the unsaved data.
Change the code to use an explicit taxonomy structure instead
of the one provided in the copy. This should ultimately allow
removal of the latter.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/taxonomy.h')
-rw-r--r-- | core/taxonomy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/taxonomy.h b/core/taxonomy.h index 8c886c9ed..5f7f0cf43 100644 --- a/core/taxonomy.h +++ b/core/taxonomy.h @@ -41,6 +41,7 @@ struct taxonomy_data { struct taxonomy *alloc_taxonomy(); void free_taxonomy(struct taxonomy_data *t); +void copy_taxonomy(struct taxonomy_data *orig, struct taxonomy_data *copy); int taxonomy_index_for_category(struct taxonomy_data *t, enum taxonomy_category cat); const char *taxonomy_get_country(struct taxonomy_data *t); void taxonomy_set_country(struct taxonomy_data *t, const char *country, enum taxonomy_origin origin); |