diff options
author | Max Kellermann <max@duempel.org> | 2013-09-04 23:53:50 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-04 23:57:30 +0200 |
commit | 681d6bbdc565ce285f798d1d0c84756f86947f97 (patch) | |
tree | cf837527e0bfa55f6247156ed42e55dc396f6709 /src/tag/TagTable.hxx | |
parent | 867b82b6deaeb0ae0517f31d58f7f0e58aa48d91 (diff) | |
download | mpd-681d6bbdc565ce285f798d1d0c84756f86947f97.tar.gz mpd-681d6bbdc565ce285f798d1d0c84756f86947f97.tar.xz mpd-681d6bbdc565ce285f798d1d0c84756f86947f97.zip |
TagTable: un-inline the two functions
Reduce header dependencies.
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 |