Commit 22206512 authored by Max Kellermann's avatar Max Kellermann

TagBuilder: add method AddEmptyItem()

parent 7fdd8014
......@@ -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();
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment