Commit 84533b6c authored by Max Kellermann's avatar Max Kellermann

TagBuilder: add method IsEmpty()

parent 8dca38e9
......@@ -66,11 +66,19 @@ public:
TagBuilder &operator=(const TagBuilder &other) = delete;
/**
* Returns true if the tag contains no items. This ignores the "time"
* attribute.
*/
bool IsEmpty() const {
return items.empty();
}
/**
* Returns true if the object contains any information.
*/
gcc_pure
bool IsDefined() const {
return time >= 0 || has_playlist || !items.empty();
return time >= 0 || has_playlist || !IsEmpty();
}
void Clear();
......
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