diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tag/TagBuilder.cxx | 10 | ||||
-rw-r--r-- | src/tag/TagBuilder.hxx | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx index 40ccff752..bc8ea2ae7 100644 --- a/src/tag/TagBuilder.cxx +++ b/src/tag/TagBuilder.cxx @@ -219,6 +219,16 @@ TagBuilder::AddItem(TagType type, const char *value) } void +TagBuilder::AddEmptyItem(TagType type) +{ + tag_pool_lock.lock(); + auto i = tag_pool_get_item(type, "", 0); + tag_pool_lock.unlock(); + + items.push_back(i); +} + +void TagBuilder::RemoveAll() { tag_pool_lock.lock(); diff --git a/src/tag/TagBuilder.hxx b/src/tag/TagBuilder.hxx index c0b4bebfa..6de52b775 100644 --- a/src/tag/TagBuilder.hxx +++ b/src/tag/TagBuilder.hxx @@ -154,6 +154,13 @@ public: void AddItem(TagType type, const char *value); /** + * Appends a new tag item with an empty value. Do not use + * this unless you know what you're doing - because usually, + * empty values are discarded. + */ + void AddEmptyItem(TagType type); + + /** * Removes all tag items. */ void RemoveAll(); |