mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Add a simple function for checking for membership in the fieldListMap.
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@572680 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
71a392fe81
commit
953b8a119a
@ -205,6 +205,11 @@ void Ogg::XiphComment::removeField(const String &key, const String &value)
|
||||
d->fieldListMap[key].clear();
|
||||
}
|
||||
|
||||
bool Ogg::XiphComment::contains(const String &key) const
|
||||
{
|
||||
return d->fieldListMap.contains(key) && !d->fieldListMap[key].isEmpty();
|
||||
}
|
||||
|
||||
ByteVector Ogg::XiphComment::render() const
|
||||
{
|
||||
return render(true);
|
||||
|
@ -156,6 +156,13 @@ namespace TagLib {
|
||||
*/
|
||||
void removeField(const String &key, const String &value = String::null);
|
||||
|
||||
/*!
|
||||
* Returns true if the field is contained within the comment.
|
||||
*
|
||||
* \note This is safer than checking for membership in the FieldListMap.
|
||||
*/
|
||||
bool contains(const String &key) const;
|
||||
|
||||
/*!
|
||||
* Renders the comment to a ByteVector suitable for inserting into a file.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user