diff options
author | Max Kellermann <max@duempel.org> | 2009-01-15 22:00:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-15 22:00:26 +0100 |
commit | ccea3654945809932a7b85b365af11f91b5a1ded (patch) | |
tree | fd38be4eef86e6a703359655849fcbd181ee6e99 /src/tag.h | |
parent | 15435b09affcd362cc047c54f6a3b052aa965889 (diff) | |
download | mpd-ccea3654945809932a7b85b365af11f91b5a1ded.tar.gz mpd-ccea3654945809932a7b85b365af11f91b5a1ded.tar.xz mpd-ccea3654945809932a7b85b365af11f91b5a1ded.zip |
tag: added tag_is_defined()
tag_is_defined() checks whether there is any information in the tag
object.
Diffstat (limited to '')
-rw-r--r-- | src/tag.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -110,6 +110,15 @@ tag_is_empty(const struct tag *tag) } /** + * Returns true if the tag contains any information. + */ +static inline bool +tag_is_defined(const struct tag *tag) +{ + return !tag_is_empty(tag) || tag->time >= 0; +} + +/** * Returns the first value of the specified tag type, or NULL if none * is present in this tag object. */ |