From 79670beca13514be767cf9e3e43d9da94498572d Mon Sep 17 00:00:00 2001 From: Michael Helmling Date: Sat, 25 Feb 2012 18:59:53 +0100 Subject: [PATCH] some cosmetic changes --- .../id3v2/frames/textidentificationframe.cpp | 4 +- .../id3v2/frames/unsynchronizedlyricsframe.h | 7 +- taglib/toolkit/tfile.cpp | 86 +++++++++---------- taglib/trueaudio/trueaudiofile.cpp | 8 +- taglib/wavpack/wavpackfile.cpp | 8 +- 5 files changed, 54 insertions(+), 59 deletions(-) diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp index 0ab1c84c..d68d0dfe 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp @@ -161,11 +161,11 @@ PropertyMap TextIdentificationFrame::asProperties() const *it = ID3v1::genre(test); } } else if(tagName == "DATE") { - for (StringList::Iterator it = values.begin(); it != values.end(); ++it) { + for(StringList::Iterator it = values.begin(); it != values.end(); ++it) { // ID3v2 specifies ISO8601 timestamps which contain a 'T' as separator between date and time. // Since this is unusual in other formats, the T is removed. int tpos = it->find("T"); - if (tpos != -1) + if(tpos != -1) (*it)[tpos] = ' '; } } diff --git a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h index 03648ee4..2a3c5f9a 100644 --- a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h +++ b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h @@ -135,12 +135,7 @@ namespace TagLib { void setTextEncoding(String::Type encoding); - /*! - * Parses this frame as PropertyMap. The returned map will contain a single key - * "LYRICS" with the text() as single value. - */ - /*! - * Parses this frame as PropertyMap with a single key. + /*! Parses this frame as PropertyMap with a single key. * - if description() is empty or "LYRICS", the key will be "LYRICS" * - if description() is not a valid PropertyMap key, the frame will be * marked unsupported by an entry "USLT/" in the unsupportedData() diff --git a/taglib/toolkit/tfile.cpp b/taglib/toolkit/tfile.cpp index 56a8e19c..09b8fdbc 100644 --- a/taglib/toolkit/tfile.cpp +++ b/taglib/toolkit/tfile.cpp @@ -117,35 +117,35 @@ FileName File::name() const PropertyMap File::properties() const { // ugly workaround until this method is virtual - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->properties(); // no specialized implementation available -> use generic one // - ASF: ugly format, largely undocumented, not worth implementing @@ -160,31 +160,31 @@ void File::removeUnsupportedProperties(const StringList &properties) { // here we only consider those formats that could possibly contain // unsupported properties - if (dynamic_cast(this)) + if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) dynamic_cast(this)->removeUnsupportedProperties(properties); else tag()->removeUnsupportedProperties(properties); @@ -192,35 +192,35 @@ void File::removeUnsupportedProperties(const StringList &properties) PropertyMap File::setProperties(const PropertyMap &properties) { - if (dynamic_cast(this)) + if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); - else if (dynamic_cast(this)) + else if(dynamic_cast(this)) return dynamic_cast(this)->setProperties(properties); else return tag()->setProperties(properties); diff --git a/taglib/trueaudio/trueaudiofile.cpp b/taglib/trueaudio/trueaudiofile.cpp index f45c6545..e10f6fa5 100644 --- a/taglib/trueaudio/trueaudiofile.cpp +++ b/taglib/trueaudio/trueaudiofile.cpp @@ -132,18 +132,18 @@ PropertyMap TrueAudio::File::properties() const { // once Tag::properties() is virtual, this case distinction could actually be done // within TagUnion. - if (d->hasID3v2) + if(d->hasID3v2) return d->tag.access(ID3v2Index, false)->properties(); - if (d->hasID3v1) + if(d->hasID3v1) return d->tag.access(ID3v1Index, false)->properties(); return PropertyMap(); } PropertyMap TrueAudio::File::setProperties(const PropertyMap &properties) { - if (d->hasID3v2) + if(d->hasID3v2) return d->tag.access(ID3v2Index, false)->setProperties(properties); - else if (d->hasID3v1) + else if(d->hasID3v1) return d->tag.access(ID3v1Index, false)->setProperties(properties); else return d->tag.access(ID3v2Index, true)->setProperties(properties); diff --git a/taglib/wavpack/wavpackfile.cpp b/taglib/wavpack/wavpackfile.cpp index 285d8ef4..2addabae 100644 --- a/taglib/wavpack/wavpackfile.cpp +++ b/taglib/wavpack/wavpackfile.cpp @@ -108,18 +108,18 @@ TagLib::Tag *WavPack::File::tag() const PropertyMap WavPack::File::properties() const { - if (d->hasAPE) + if(d->hasAPE) return d->tag.access(APEIndex, false)->properties(); - if (d->hasID3v1) + if(d->hasID3v1) return d->tag.access(ID3v1Index, false)->properties(); return PropertyMap(); } PropertyMap WavPack::File::setProperties(const PropertyMap &properties) { - if (d->hasAPE) + if(d->hasAPE) return d->tag.access(APEIndex, false)->setProperties(properties); - else if (d->hasID3v1) + else if(d->hasID3v1) return d->tag.access(ID3v1Index, false)->setProperties(properties); else return d->tag.access(APE, true)->setProperties(properties); -- 2.40.0