diff options
-rw-r--r-- | src/tag/TagBuilder.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tag/TagBuilder.hxx b/src/tag/TagBuilder.hxx index c882f4d53..4eeb0c48d 100644 --- a/src/tag/TagBuilder.hxx +++ b/src/tag/TagBuilder.hxx @@ -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(); |