From 2f1645947a4d9f4504d16dbd778d88763c4812cc Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Sun, 13 Aug 2006 23:10:43 +0000 Subject: [PATCH] This if doesn't need to be there. The encoding byte should be there even if there is no string content. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@572787 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- mpeg/id3v2/frames/textidentificationframe.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/mpeg/id3v2/frames/textidentificationframe.cpp b/mpeg/id3v2/frames/textidentificationframe.cpp index 809532c2..c4bb339a 100644 --- a/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/mpeg/id3v2/frames/textidentificationframe.cpp @@ -120,21 +120,18 @@ ByteVector TextIdentificationFrame::renderFields() const { ByteVector v; - if(d->fieldList.size() > 0) { + v.append(char(d->textEncoding)); - v.append(char(d->textEncoding)); + for(StringList::Iterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) { - for(StringList::Iterator it = d->fieldList.begin(); it != d->fieldList.end(); it++) { + // Since the field list is null delimited, if this is not the first + // element in the list, append the appropriate delimiter for this + // encoding. - // Since the field list is null delimited, if this is not the first - // element in the list, append the appropriate delimiter for this - // encoding. + if(it != d->fieldList.begin()) + v.append(textDelimiter(d->textEncoding)); - if(it != d->fieldList.begin()) - v.append(textDelimiter(d->textEncoding)); - - v.append((*it).data(d->textEncoding)); - } + v.append((*it).data(d->textEncoding)); } return v;