diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-09-06 13:13:36 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-09-06 12:59:54 -0700 |
commit | f93acdace7234b727dec830adbaed6b9edb3e6ac (patch) | |
tree | fe2e4daba78c99fb5f798c6c5b4247cdc03c2d6d /core/taxonomy.h | |
parent | 7f1def86021eda8cc01911b4944be4bc38ae65fe (diff) | |
download | subsurface-f93acdace7234b727dec830adbaed6b9edb3e6ac.tar.gz |
cleanup: make alloc_taxonomy local to taxonomy.c
The alloc_taxonomy()/free_taxonomy() interface was exceedingly strange.
The former gave a "struct taxonomy", the latter took a "struct taxonomy_data".
To make things worse, is appears as if the names "taxonomy" and "taxonoma_data"
are reversed: the latter contains the former.
In any case, the alloc_taxonomy() call is not needed anymore from outside
taxonomy.c, as these memory-management details are now hidden in accessor
functions. Therefore, make the function local to taxonomy.c. Moreover,
rename it to "alloc_taxonomy_table()" and let it take a "taxonomy_data"
structure for symmetry with "free_taxonomy()".
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, 0 insertions, 1 deletions
diff --git a/core/taxonomy.h b/core/taxonomy.h index 97205a48f..84caa5baa 100644 --- a/core/taxonomy.h +++ b/core/taxonomy.h @@ -39,7 +39,6 @@ struct taxonomy_data { struct taxonomy *category; }; -struct taxonomy *alloc_taxonomy(); 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); |