TagBuilder: add method IsEmpty()

This commit is contained in:
Max Kellermann 2013-09-05 19:14:39 +02:00
parent 8dca38e979
commit 84533b6cad

View File

@ -65,12 +65,20 @@ public:
TagBuilder(const TagBuilder &other) = delete;
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();