diff options
Diffstat (limited to 'src/tag/TagTable.cxx')
-rw-r--r-- | src/tag/TagTable.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tag/TagTable.cxx b/src/tag/TagTable.cxx index b51bc35ba..5224404a9 100644 --- a/src/tag/TagTable.cxx +++ b/src/tag/TagTable.cxx @@ -51,3 +51,13 @@ tag_table_lookup_i(const struct tag_table *table, const char *name) return TAG_NUM_OF_ITEM_TYPES; } + +const char * +tag_table_lookup(const tag_table *table, TagType type) +{ + for (; table->name != nullptr; ++table) + if (table->type == type) + return table->name; + + return nullptr; +} |