TagBuilder: add method AddEmptyItem()
This commit is contained in:
parent
7fdd801479
commit
2220651253
@ -218,6 +218,16 @@ TagBuilder::AddItem(TagType type, const char *value)
|
|||||||
AddItem(type, value, strlen(value));
|
AddItem(type, value, strlen(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
|
void
|
||||||
TagBuilder::RemoveAll()
|
TagBuilder::RemoveAll()
|
||||||
{
|
{
|
||||||
|
@ -153,6 +153,13 @@ public:
|
|||||||
gcc_nonnull_all
|
gcc_nonnull_all
|
||||||
void AddItem(TagType type, const char *value);
|
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.
|
* Removes all tag items.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user