mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Rename enum values for taxonomy
This avoids confusion and namespace collisions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
08f8eb6eb5
commit
bc8c54f1ee
10 changed files with 22 additions and 22 deletions
|
@ -2,7 +2,7 @@
|
|||
#include "gettext.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
char *taxonomy_category_names[NR_CATEGORIES] = {
|
||||
char *taxonomy_category_names[TC_NR_CATEGORIES] = {
|
||||
QT_TRANSLATE_NOOP("getTextFromC", "None"),
|
||||
QT_TRANSLATE_NOOP("getTextFromC", "Ocean"),
|
||||
QT_TRANSLATE_NOOP("getTextFromC", "Country"),
|
||||
|
@ -12,7 +12,7 @@ char *taxonomy_category_names[NR_CATEGORIES] = {
|
|||
};
|
||||
|
||||
// these are the names for geoname.org
|
||||
char *taxonomy_api_names[NR_CATEGORIES] = {
|
||||
char *taxonomy_api_names[TC_NR_CATEGORIES] = {
|
||||
"none",
|
||||
"name",
|
||||
"countryName",
|
||||
|
@ -23,13 +23,13 @@ char *taxonomy_api_names[NR_CATEGORIES] = {
|
|||
|
||||
struct taxonomy *alloc_taxonomy()
|
||||
{
|
||||
return calloc(NR_CATEGORIES, sizeof(struct taxonomy));
|
||||
return calloc(TC_NR_CATEGORIES, sizeof(struct taxonomy));
|
||||
}
|
||||
|
||||
void free_taxonomy(struct taxonomy *t)
|
||||
{
|
||||
if (t) {
|
||||
for (int i = 0; i < NR_CATEGORIES; i++)
|
||||
for (int i = 0; i < TC_NR_CATEGORIES; i++)
|
||||
free((void *)t[i].value);
|
||||
free(t);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue