tag: added tag_is_defined()
tag_is_defined() checks whether there is any information in the tag object.
This commit is contained in:
@@ -109,6 +109,15 @@ tag_is_empty(const struct tag *tag)
|
|||||||
return tag->numOfItems == 0;
|
return tag->numOfItems == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Returns the first value of the specified tag type, or NULL if none
|
||||||
* is present in this tag object.
|
* is present in this tag object.
|
||||||
|
Reference in New Issue
Block a user