From e26bff9b92b78999aadf80afa6c674c30d6d7be1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 4 Nov 2008 16:55:11 +0100 Subject: tag: added tag_is_empty() --- src/tag.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/tag.h b/src/tag.h index 899768e2b..c1c7d7e9a 100644 --- a/src/tag.h +++ b/src/tag.h @@ -89,6 +89,16 @@ static inline void tag_add_item(struct tag *tag, enum tag_type itemType, struct tag *tag_dup(const struct tag *tag); +/** + * Returns true if the tag contains no items. This ignores the "time" + * attribute. + */ +static inline bool +tag_is_empty(const struct tag *tag) +{ + return tag->numOfItems == 0; +} + /** * Checks whether the tag contains one or more items with * the specified type. -- cgit v1.2.3