mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: use taxonomy_set_category() function
Instead of manipulating the taxonomy structures directly, use the taxonomy_set_category() function. This improves encapsulation and gives us the possibility to improve the taxonomy data structures. This concerns three places: 1) git parser 2) XML parser 3) reverse geo-lookup This improves the XML parser code slightly: The parser assumes that the value-attribute comes last (after origin and category). While it still does that, it now at least generates a warning if it encounters a value-attribute without origin- or category-attribute. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
55e4237306
commit
7f1def8602
5 changed files with 32 additions and 38 deletions
|
|
@ -52,6 +52,7 @@ struct parser_state {
|
|||
struct sample *cur_sample; /* non-owning */
|
||||
struct picture cur_picture; /* owning */
|
||||
char *country, *city; /* owning */
|
||||
int taxonomy_category, taxonomy_origin;
|
||||
|
||||
bool in_settings;
|
||||
bool in_userid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue