diff options
Diffstat (limited to 'src/tag/TagTable.hxx')
-rw-r--r-- | src/tag/TagTable.hxx | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/tag/TagTable.hxx b/src/tag/TagTable.hxx index 70c02e6e5..88bf5b028 100644 --- a/src/tag/TagTable.hxx +++ b/src/tag/TagTable.hxx @@ -23,10 +23,6 @@ #include "TagType.h" #include "gcc.h" -#include <glib.h> - -#include <string.h> - struct tag_table { const char *name; @@ -39,15 +35,8 @@ struct tag_table { * in the table. */ gcc_pure -static inline enum tag_type -tag_table_lookup(const struct tag_table *table, const char *name) -{ - for (; table->name != nullptr; ++table) - if (strcmp(name, table->name) == 0) - return table->type; - - return TAG_NUM_OF_ITEM_TYPES; -} +tag_type +tag_table_lookup(const tag_table *table, const char *name); /** * Looks up a string in a tag translation table (case insensitive). @@ -55,14 +44,7 @@ tag_table_lookup(const struct tag_table *table, const char *name) * in the table. */ gcc_pure -static inline enum tag_type -tag_table_lookup_i(const struct tag_table *table, const char *name) -{ - for (; table->name != nullptr; ++table) - if (g_ascii_strcasecmp(name, table->name) == 0) - return table->type; - - return TAG_NUM_OF_ITEM_TYPES; -} +tag_type +tag_table_lookup_i(const tag_table *table, const char *name); #endif |