core: convert taxonomy.c to C++

Since the taxonomy is now a real C++ struct with constructor
and destructor, dive_site has to be converted to C++ as well.

A bit hairy for now, but will ultimately be distinctly simpler.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-04 13:39:04 +02:00 committed by bstoeger
parent 3c1401785b
commit 3f8b4604be
39 changed files with 259 additions and 336 deletions

View file

@ -332,8 +332,8 @@ static void parse_site_geo(char *line, struct git_parser_state *state)
int origin;
int category;
sscanf(line, "cat %d origin %d \"", &category, &origin);
taxonomy_set_category(&state->active_site->taxonomy, (taxonomy_category)category,
get_first_converted_string(state).c_str(), (taxonomy_origin)origin);
taxonomy_set_category(state->active_site->taxonomy, (taxonomy_category)category,
get_first_converted_string(state), (taxonomy_origin)origin);
}
static std::string pop_cstring(struct git_parser_state *state, const char *err)