From: Tsuda Kageyu Date: Sun, 22 Nov 2015 09:30:56 +0000 (+0900) Subject: Avoid using obsolete XiphComment::removeField(). X-Git-Tag: v1.11beta~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83a0bc3710e025683a9fb08ea343bcce024dd271;p=taglib Avoid using obsolete XiphComment::removeField(). --- diff --git a/taglib/ogg/xiphcomment.cpp b/taglib/ogg/xiphcomment.cpp index a36862df..9de81788 100644 --- a/taglib/ogg/xiphcomment.cpp +++ b/taglib/ogg/xiphcomment.cpp @@ -154,18 +154,18 @@ void Ogg::XiphComment::setGenre(const String &s) void Ogg::XiphComment::setYear(uint i) { - removeField("YEAR"); + removeFields("YEAR"); if(i == 0) - removeField("DATE"); + removeFields("DATE"); else addField("DATE", String::number(i)); } void Ogg::XiphComment::setTrack(uint i) { - removeField("TRACKNUM"); + removeFields("TRACKNUM"); if(i == 0) - removeField("TRACKNUMBER"); + removeFields("TRACKNUMBER"); else addField("TRACKNUMBER", String::number(i)); } @@ -210,7 +210,7 @@ PropertyMap Ogg::XiphComment::setProperties(const PropertyMap &properties) toRemove.append(it->first); for(StringList::ConstIterator it = toRemove.begin(); it != toRemove.end(); ++it) - removeField(*it); + removeFields(*it); // now go through keys in \a properties and check that the values match those in the xiph comment PropertyMap invalid; @@ -223,7 +223,7 @@ PropertyMap Ogg::XiphComment::setProperties(const PropertyMap &properties) const StringList &sl = it->second; if(sl.isEmpty()) // zero size string list -> remove the tag with all values - removeField(it->first); + removeFields(it->first); else { // replace all strings in the list for the tag StringList::ConstIterator valueIterator = sl.begin(); @@ -256,7 +256,7 @@ String Ogg::XiphComment::vendorID() const void Ogg::XiphComment::addField(const String &key, const String &value, bool replace) { if(replace) - removeField(key.upper()); + removeFields(key.upper()); if(!key.isEmpty() && !value.isEmpty()) d->fieldListMap[key.upper()].append(value);