TagBuilder: add method IsEmpty()
This commit is contained in:
parent
8dca38e979
commit
84533b6cad
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user