Commit 074a23e6 authored by Max Kellermann's avatar Max Kellermann

TagBuilder: add method HasType()

parent 2fb61534
......@@ -74,6 +74,16 @@ TagBuilder::Commit()
return tag;
}
bool
TagBuilder::HasType(TagType type) const
{
for (auto i : items)
if (i->type == type)
return true;
return false;
}
inline void
TagBuilder::AddItemInternal(TagType type, const char *value, size_t length)
{
......
......@@ -109,6 +109,13 @@ public:
}
/**
* Checks whether the tag contains one or more items with
* the specified type.
*/
gcc_pure
bool HasType(TagType type) const;
/**
* Appends a new tag item.
*
* @param type the type of the new tag item
......
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