diff options
author | Lukáš Lalinský <lalinsky@gmail.com> | 2012-07-14 21:09:54 +0200 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2012-07-14 21:09:54 +0200 |
commit | 61ed295af8c983c16994f996a3f1387b23b02c5b (patch) | |
tree | 1d404b63e68d342c0bf88d0351fbe4241b8ac12a | |
parent | 09af2a7b5770aa0e87de8f5188fb7a3594a33674 (diff) | |
parent | 06597123b8200303aca600eaf2a775afdb72b7b3 (diff) |
Merge remote-tracking branch 'poiru/master'
37 files changed, 72 insertions, 72 deletions
diff --git a/bindings/c/tag_c.cpp b/bindings/c/tag_c.cpp index 869e0f4b..b1af613c 100644 --- a/bindings/c/tag_c.cpp +++ b/bindings/c/tag_c.cpp @@ -109,7 +109,7 @@ void taglib_file_free(TagLib_File *file) BOOL taglib_file_is_valid(const TagLib_File *file) { - return reinterpret_cast<const File *>(file)->isValid(); + return reinterpret_cast<const File *>(file)->isValid(); } TagLib_Tag *taglib_file_tag(const TagLib_File *file) diff --git a/bindings/c/tag_c.h b/bindings/c/tag_c.h index 3be146d0..ab5dd202 100644 --- a/bindings/c/tag_c.h +++ b/bindings/c/tag_c.h @@ -104,7 +104,7 @@ typedef enum { /*! * Creates a TagLib file based on \a filename. TagLib will try to guess the file * type. - * + * * \returns NULL if the file type cannot be determined or the file cannot * be opened. */ diff --git a/taglib/ape/apeitem.cpp b/taglib/ape/apeitem.cpp index ac0e26ed..9d9647ec 100644 --- a/taglib/ape/apeitem.cpp +++ b/taglib/ape/apeitem.cpp @@ -71,7 +71,7 @@ APE::Item::Item(const String &key, const ByteVector &value, bool binary) d->value = value; } else - d->text.append(value); + d->text.append(value); } APE::Item::Item(const Item &item) @@ -172,7 +172,7 @@ int APE::Item::size() const case Text: if(d->text.size()) { StringList::ConstIterator it = d->text.begin(); - + result += it->data(String::UTF8).size(); it++; for(; it != d->text.end(); ++it) diff --git a/taglib/asf/asfattribute.h b/taglib/asf/asfattribute.h index 56186999..54eb0c7d 100644 --- a/taglib/asf/asfattribute.h +++ b/taglib/asf/asfattribute.h @@ -70,7 +70,7 @@ namespace TagLib /*! * Constructs an attribute with \a key and a BytesType \a value. */ - Attribute(const ByteVector &value); + Attribute(const ByteVector &value); /*! * Constructs an attribute with \a key and a Picture \a value. diff --git a/taglib/asf/asffile.cpp b/taglib/asf/asffile.cpp index 2edff441..e2823c7e 100644 --- a/taglib/asf/asffile.cpp +++ b/taglib/asf/asffile.cpp @@ -368,14 +368,14 @@ ByteVector ASF::File::HeaderExtensionObject::render(ASF::File *file) // public members //////////////////////////////////////////////////////////////////////////////// -ASF::File::File(FileName file, bool readProperties, Properties::ReadStyle propertiesStyle) +ASF::File::File(FileName file, bool readProperties, Properties::ReadStyle propertiesStyle) : TagLib::File(file) { d = new FilePrivate; read(readProperties, propertiesStyle); } -ASF::File::File(IOStream *stream, bool readProperties, Properties::ReadStyle propertiesStyle) +ASF::File::File(IOStream *stream, bool readProperties, Properties::ReadStyle propertiesStyle) : TagLib::File(stream) { d = new FilePrivate; diff --git a/taglib/asf/asfproperties.cpp b/taglib/asf/asfproperties.cpp index 0857f0c3..835cbdf9 100644 --- a/taglib/asf/asfproperties.cpp +++ b/taglib/asf/asfproperties.cpp @@ -56,7 +56,7 @@ ASF::Properties::Properties() : AudioProperties(AudioProperties::Average) ASF::Properties::~Properties() { if(d) - delete d; + delete d; } int ASF::Properties::length() const @@ -77,7 +77,7 @@ int ASF::Properties::sampleRate() const int ASF::Properties::channels() const { return d->channels; -} +} bool ASF::Properties::isEncrypted() const { diff --git a/taglib/asf/asfproperties.h b/taglib/asf/asfproperties.h index ca7b581d..95730d8e 100644 --- a/taglib/asf/asfproperties.h +++ b/taglib/asf/asfproperties.h @@ -73,4 +73,4 @@ namespace TagLib { } -#endif +#endif diff --git a/taglib/asf/asftag.h b/taglib/asf/asftag.h index a6c49df5..6b2d2bf3 100644 --- a/taglib/asf/asftag.h +++ b/taglib/asf/asftag.h @@ -120,17 +120,17 @@ namespace TagLib { virtual void setComment(const String &s); /*! - * Sets the rating to \a s. + * Sets the rating to \a s. */ virtual void setRating(const String &s); /*! - * Sets the copyright to \a s. + * Sets the copyright to \a s. */ virtual void setCopyright(const String &s); /*! - * Sets the genre to \a s. + * Sets the genre to \a s. */ virtual void setGenre(const String &s); diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 2e5ceb26..5c42ed4c 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -1,7 +1,7 @@ /*************************************************************************** copyright : (C) 2002 - 2008 by Scott Wheeler email : wheeler@kde.org - + copyright : (C) 2010 by Alex Novichkov email : novichko@atnet.ru (added APE file support) diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h index b2ecce22..31dfebd7 100644 --- a/taglib/flac/flacfile.h +++ b/taglib/flac/flacfile.h @@ -218,7 +218,7 @@ namespace TagLib { * Returns a list of pictures attached to the FLAC file. */ List<Picture *> pictureList(); - + /*! * Removes an attached picture. If \a del is true the picture's memory * will be freed; if it is false, it must be deleted by the user. diff --git a/taglib/flac/flacmetadatablock.cpp b/taglib/flac/flacmetadatablock.cpp index 0671fc3a..7d161c27 100644 --- a/taglib/flac/flacmetadatablock.cpp +++ b/taglib/flac/flacmetadatablock.cpp @@ -33,7 +33,7 @@ using namespace TagLib; -class FLAC::MetadataBlock::MetadataBlockPrivate +class FLAC::MetadataBlock::MetadataBlockPrivate { public: MetadataBlockPrivate() {} diff --git a/taglib/flac/flacpicture.cpp b/taglib/flac/flacpicture.cpp index 38967199..36019248 100644 --- a/taglib/flac/flacpicture.cpp +++ b/taglib/flac/flacpicture.cpp @@ -33,7 +33,7 @@ using namespace TagLib; -class FLAC::Picture::PicturePrivate +class FLAC::Picture::PicturePrivate { public: PicturePrivate() : @@ -117,7 +117,7 @@ bool FLAC::Picture::parse(const ByteVector &data) } d->data = data.mid(pos, dataLength); - return true; + return true; } ByteVector FLAC::Picture::render() const diff --git a/taglib/flac/flacunknownmetadatablock.cpp b/taglib/flac/flacunknownmetadatablock.cpp index 96e3447f..1265affb 100644 --- a/taglib/flac/flacunknownmetadatablock.cpp +++ b/taglib/flac/flacunknownmetadatablock.cpp @@ -34,7 +34,7 @@ using namespace TagLib; -class FLAC::UnknownMetadataBlock::UnknownMetadataBlockPrivate +class FLAC::UnknownMetadataBlock::UnknownMetadataBlockPrivate { public: UnknownMetadataBlockPrivate() : code(0) {} diff --git a/taglib/it/itfile.cpp b/taglib/it/itfile.cpp index dc03b60a..51b57b0c 100644 --- a/taglib/it/itfile.cpp +++ b/taglib/it/itfile.cpp @@ -125,7 +125,7 @@ bool IT::File::save() ulong sampleOffset = 0; if(!readU32L(sampleOffset)) return false; - + seek(sampleOffset + 20); if((i + instrumentCount) < lines.size()) @@ -206,7 +206,7 @@ void IT::File::read(bool) READ_U16L_AS(length); READ_U16L_AS(instrumentCount); READ_U16L_AS(sampleCount); - + d->properties.setInstrumentCount(instrumentCount); d->properties.setSampleCount(sampleCount); READ_U16L(d->properties.setPatternCount); @@ -255,7 +255,7 @@ void IT::File::read(bool) ++channels; } d->properties.setChannels(channels); - + // real length might be shorter because of skips and terminator ushort realLength = 0; for(ushort i = 0; i < length; ++ i) { @@ -287,11 +287,11 @@ void IT::File::read(bool) READ_STRING_AS(instrumentName, 26); comment.append(instrumentName); } - + for(ushort i = 0; i < sampleCount; ++ i) { seek(192L + length + ((long)instrumentCount << 2) + ((long)i << 2)); READ_U32L_AS(sampleOffset); - + seek(sampleOffset); ByteVector sampleMagic = readBlock(4); @@ -317,7 +317,7 @@ void IT::File::read(bool) READ_BYTE_AS(vibratoRate); READ_BYTE_AS(vibratoType); */ - + comment.append(sampleName); } diff --git a/taglib/it/itproperties.h b/taglib/it/itproperties.h index 7e0fb530..da2a7c4f 100644 --- a/taglib/it/itproperties.h +++ b/taglib/it/itproperties.h @@ -50,7 +50,7 @@ namespace TagLib { Properties(AudioProperties::ReadStyle propertiesStyle); virtual ~Properties(); - + int length() const; int bitrate() const; int sampleRate() const; diff --git a/taglib/mod/modproperties.cpp b/taglib/mod/modproperties.cpp index 47903454..c9871489 100644 --- a/taglib/mod/modproperties.cpp +++ b/taglib/mod/modproperties.cpp @@ -33,7 +33,7 @@ public: lengthInPatterns(0) { } - + int channels; uint instrumentCount; uchar lengthInPatterns; diff --git a/taglib/mod/modproperties.h b/taglib/mod/modproperties.h index 1e04baaf..d50353a4 100644 --- a/taglib/mod/modproperties.h +++ b/taglib/mod/modproperties.h @@ -34,7 +34,7 @@ namespace TagLib { public: Properties(AudioProperties::ReadStyle propertiesStyle); virtual ~Properties(); - + int length() const; int bitrate() const; int sampleRate() const; diff --git a/taglib/mod/modtag.h b/taglib/mod/modtag.h index c1a74b10..f33e33f2 100644 --- a/taglib/mod/modtag.h +++ b/taglib/mod/modtag.h @@ -150,10 +150,10 @@ namespace TagLib { /*! * Sets the tracker name to \a trackerName. If \a trackerName is * String::null then this value will be cleared. - * + * * Note that only XM files support this tag. Setting the * tracker name for other module file formats will be ignored. - * + * * The length of this tag is limited to 20 characters (1 character * = 1 byte). */ diff --git a/taglib/mpeg/id3v2/frames/privateframe.cpp b/taglib/mpeg/id3v2/frames/privateframe.cpp index f2d2a03c..24ee0f35 100644 --- a/taglib/mpeg/id3v2/frames/privateframe.cpp +++ b/taglib/mpeg/id3v2/frames/privateframe.cpp @@ -98,7 +98,7 @@ void PrivateFrame::parseFields(const ByteVector &data) } // Owner identifier is assumed to be Latin1 - + const int byteAlign = 1; const int endOfOwner = data.find(textDelimiter(String::Latin1), 0, byteAlign); diff --git a/taglib/ogg/oggfile.cpp b/taglib/ogg/oggfile.cpp index 01bb5c9d..cc30f9ce 100644 --- a/taglib/ogg/oggfile.cpp +++ b/taglib/ogg/oggfile.cpp @@ -281,8 +281,8 @@ void Ogg::File::writePageGroup(const List<int> &thePageGroup) return; - // pages in the pageGroup and packets must be equivalent - // (originalSize and size of packets would not work together), + // pages in the pageGroup and packets must be equivalent + // (originalSize and size of packets would not work together), // therefore we sometimes have to add pages to the group List<int> pageGroup(thePageGroup); while (!d->pages[pageGroup.back()]->header()->lastPacketCompleted()) { @@ -341,7 +341,7 @@ void Ogg::File::writePageGroup(const List<int> &thePageGroup) if (pages.back()->header()->pageSequenceNumber() != pageGroup.back()) { - // TODO: change the internal data structure so that we don't need to hold the + // TODO: change the internal data structure so that we don't need to hold the // complete file in memory (is unavoidable at the moment) // read the complete stream diff --git a/taglib/ogg/oggpage.cpp b/taglib/ogg/oggpage.cpp index 732f01dd..e5f767ec 100644 --- a/taglib/ogg/oggpage.cpp +++ b/taglib/ogg/oggpage.cpp @@ -116,9 +116,9 @@ Ogg::Page::ContainsPacketFlags Ogg::Page::containsPacket(int index) const flags = ContainsPacketFlags(flags | CompletePacket); } - // Or if there is more than one page and the page is - // (a) the first page and it's complete or - // (b) the last page and it's complete or + // Or if there is more than one page and the page is + // (a) the first page and it's complete or + // (b) the last page and it's complete or // (c) a page in the middle. else if(packetCount() > 1 && ((flags & BeginsWithPacket && !d->header.firstPacketContinued()) || @@ -266,7 +266,7 @@ List<Ogg::Page *> Ogg::Page::paginate(const ByteVectorList &packets, } Page *p = new Page(packetList, streamSerialNumber, firstPage+pageIndex, continued, - lastPacketInList ? lastPacketCompleted : true, + lastPacketInList ? lastPacketCompleted : true, isVeryLastPacket); pageIndex++; diff --git a/taglib/ogg/oggpage.h b/taglib/ogg/oggpage.h index a8d5c1a3..e9f4840c 100644 --- a/taglib/ogg/oggpage.h +++ b/taglib/ogg/oggpage.h @@ -70,9 +70,9 @@ namespace TagLib { */ const PageHeader *header() const; - /*! + /*! * Returns a copy of the page with \a sequenceNumber set as sequence number. - * + * * \see header() * \see PageHeader::setPageSequenceNumber() */ diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index 0e70dd5e..df3b3663 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -189,7 +189,7 @@ void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data) d->chunks[i].padding = 1; offset++; } - + Chunk chunk; chunk.name = name; chunk.size = data.size(); diff --git a/taglib/s3m/s3mfile.cpp b/taglib/s3m/s3mfile.cpp index 98bc6a56..7ffdf910 100644 --- a/taglib/s3m/s3mfile.cpp +++ b/taglib/s3m/s3mfile.cpp @@ -118,7 +118,7 @@ bool S3M::File::save() } seek(channels, Current); - + StringList lines = d->tag.comment().split("\n"); // write comment as sample names: for(ushort i = 0; i < sampleCount; ++ i) { @@ -189,13 +189,13 @@ void S3M::File::read(bool) if(setting != 0xff) ++ channels; } d->properties.setChannels(channels); - + seek(96); ushort realLength = 0; for(ushort i = 0; i < length; ++ i) { - READ_BYTE_AS(order); - if(order == 255) break; - if(order != 254) ++ realLength; + READ_BYTE_AS(order); + if(order == 255) break; + if(order != 254) ++ realLength; } d->properties.setLengthInPatterns(realLength); diff --git a/taglib/s3m/s3mproperties.cpp b/taglib/s3m/s3mproperties.cpp index 8b50a60b..47b30562 100644 --- a/taglib/s3m/s3mproperties.cpp +++ b/taglib/s3m/s3mproperties.cpp @@ -42,7 +42,7 @@ public: bpmSpeed(0) { } - + ushort lengthInPatterns; int channels; bool stereo; diff --git a/taglib/s3m/s3mproperties.h b/taglib/s3m/s3mproperties.h index 0c088668..6e9f1d29 100644 --- a/taglib/s3m/s3mproperties.h +++ b/taglib/s3m/s3mproperties.h @@ -43,7 +43,7 @@ namespace TagLib { Properties(AudioProperties::ReadStyle propertiesStyle); virtual ~Properties(); - + int length() const; int bitrate() const; int sampleRate() const; diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index 7f14ca67..59e3a9ed 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -481,7 +481,7 @@ ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &wit target += withSize; offset += chunkSize + patternSize; } - + // replace private data: if(d->deref()) delete d; diff --git a/taglib/wavpack/wavpackproperties.cpp b/taglib/wavpack/wavpackproperties.cpp index 53c6d763..7b3faa1a 100644 --- a/taglib/wavpack/wavpackproperties.cpp +++ b/taglib/wavpack/wavpackproperties.cpp @@ -161,7 +161,7 @@ void WavPack::Properties::read() unsigned int samples = d->data.mid(12, 4).toUInt(false); if(samples == ~0u) { if(d->file && d->style != Fast) { - samples = seekFinalIndex(); + samples = seekFinalIndex(); } else { samples = 0; diff --git a/taglib/xm/xmproperties.cpp b/taglib/xm/xmproperties.cpp index e0b489ac..8c975ed8 100644 --- a/taglib/xm/xmproperties.cpp +++ b/taglib/xm/xmproperties.cpp @@ -40,7 +40,7 @@ public: bpmSpeed(0) { } - + ushort lengthInPatterns; int channels; ushort version; @@ -57,7 +57,7 @@ XM::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) : AudioProperties(propertiesStyle), d(new PropertiesPrivate) { -} +} XM::Properties::~Properties() { diff --git a/taglib/xm/xmproperties.h b/taglib/xm/xmproperties.h index 1bb89671..9b6624a7 100644 --- a/taglib/xm/xmproperties.h +++ b/taglib/xm/xmproperties.h @@ -38,7 +38,7 @@ namespace TagLib { Properties(AudioProperties::ReadStyle propertiesStyle); virtual ~Properties(); - + int length() const; int bitrate() const; int sampleRate() const; diff --git a/tests/test_apetag.cpp b/tests/test_apetag.cpp index 422725df..c4696703 100644 --- a/tests/test_apetag.cpp +++ b/tests/test_apetag.cpp @@ -41,17 +41,17 @@ public: void testPropertyInterface1() { - APE::Tag tag; - PropertyMap dict = tag.properties(); - CPPUNIT_ASSERT(dict.isEmpty()); - dict["ARTIST"] = String("artist 1"); - dict["ARTIST"].append("artist 2"); - dict["TRACKNUMBER"].append("17"); - tag.setProperties(dict); - CPPUNIT_ASSERT_EQUAL(String("17"), tag.itemListMap()["TRACK"].values()[0]); - CPPUNIT_ASSERT_EQUAL(2u, tag.itemListMap()["ARTIST"].values().size()); - CPPUNIT_ASSERT_EQUAL(String("artist 1"), tag.artist()); - CPPUNIT_ASSERT_EQUAL(17u, tag.track()); + APE::Tag tag; + PropertyMap dict = tag.properties(); + CPPUNIT_ASSERT(dict.isEmpty()); + dict["ARTIST"] = String("artist 1"); + dict["ARTIST"].append("artist 2"); + dict["TRACKNUMBER"].append("17"); + tag.setProperties(dict); + CPPUNIT_ASSERT_EQUAL(String("17"), tag.itemListMap()["TRACK"].values()[0]); + CPPUNIT_ASSERT_EQUAL(2u, tag.itemListMap()["ARTIST"].values().size()); + CPPUNIT_ASSERT_EQUAL(String("artist 1"), tag.artist()); + CPPUNIT_ASSERT_EQUAL(17u, tag.track()); } void testPropertyInterface2() diff --git a/tests/test_asf.cpp b/tests/test_asf.cpp index bcebc164..51981342 100644 --- a/tests/test_asf.cpp +++ b/tests/test_asf.cpp @@ -164,7 +164,7 @@ public: f = new ASF::File(newname.c_str()); ASF::AttributeList values2 = f->tag()->attributeListMap()["WM/Picture"]; CPPUNIT_ASSERT_EQUAL(TagLib::uint(1), values2.size()); - ASF::Attribute attr2 = values2.front(); + ASF::Attribute attr2 = values2.front(); ASF::Picture picture2 = attr2.toPicture(); CPPUNIT_ASSERT(picture2.isValid()); CPPUNIT_ASSERT_EQUAL(String("image/jpeg"), picture2.mimeType()); diff --git a/tests/test_flac.cpp b/tests/test_flac.cpp index 1bf6015a..992a02b8 100644 --- a/tests/test_flac.cpp +++ b/tests/test_flac.cpp @@ -212,7 +212,7 @@ public: void testDict() { - // test unicode & multiple values with dict interface + // test unicode & multiple values with dict interface ScopedFileCopy copy("silence-44-s", ".flac"); string newname = copy.fileName(); diff --git a/tests/test_it.cpp b/tests/test_it.cpp index 167aa6ef..53d8ea0e 100644 --- a/tests/test_it.cpp +++ b/tests/test_it.cpp @@ -100,7 +100,7 @@ private: IT::Properties *p = file.audioProperties(); Mod::Tag *t = file.tag(); - + CPPUNIT_ASSERT(0 != p); CPPUNIT_ASSERT(0 != t); diff --git a/tests/test_mod.cpp b/tests/test_mod.cpp index a3919d7e..05657c13 100644 --- a/tests/test_mod.cpp +++ b/tests/test_mod.cpp @@ -102,7 +102,7 @@ private: Mod::Properties *p = file.audioProperties(); Mod::Tag *t = file.tag(); - + CPPUNIT_ASSERT(0 != p); CPPUNIT_ASSERT(0 != t); diff --git a/tests/test_s3m.cpp b/tests/test_s3m.cpp index e2566626..a6ecc084 100644 --- a/tests/test_s3m.cpp +++ b/tests/test_s3m.cpp @@ -90,7 +90,7 @@ private: S3M::Properties *p = file.audioProperties(); Mod::Tag *t = file.tag(); - + CPPUNIT_ASSERT(0 != p); CPPUNIT_ASSERT(0 != t); diff --git a/tests/test_xm.cpp b/tests/test_xm.cpp index c6af369e..70b3967e 100644 --- a/tests/test_xm.cpp +++ b/tests/test_xm.cpp @@ -122,7 +122,7 @@ public: XM::Properties *p = file.audioProperties(); Mod::Tag *t = file.tag(); - + CPPUNIT_ASSERT(0 != p); CPPUNIT_ASSERT(0 != t); @@ -168,7 +168,7 @@ private: XM::Properties *p = file.audioProperties(); Mod::Tag *t = file.tag(); - + CPPUNIT_ASSERT(0 != p); CPPUNIT_ASSERT(0 != t); @@ -193,7 +193,7 @@ private: CPPUNIT_ASSERT_EQUAL(0U, t->track()); CPPUNIT_ASSERT_EQUAL(trackerName, t->trackerName()); } - + void testWriteTags(const String &comment) { ScopedFileCopy copy("test", ".xm"); |