From 681d6bbdc565ce285f798d1d0c84756f86947f97 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Sep 2013 23:53:50 +0200 Subject: TagTable: un-inline the two functions Reduce header dependencies. --- src/tag/TagTable.hxx | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'src/tag/TagTable.hxx') 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 - -#include - 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 -- cgit v1.2.3