From 248e487dd5d6befc8ba2a6aefd7481f20db2e6b3 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 22 Jun 2020 02:32:37 +0200 Subject: [PATCH] taglib: Remove unused functions + add virtual and explicit --- 3rdparty/taglib/ape/apefile.h | 8 +-- 3rdparty/taglib/ape/apefooter.h | 6 +- 3rdparty/taglib/ape/apeitem.cpp | 12 ---- 3rdparty/taglib/ape/apeitem.h | 19 ++---- 3rdparty/taglib/ape/apeproperties.h | 10 ++-- 3rdparty/taglib/ape/apetag.h | 6 +- 3rdparty/taglib/asf/asfattribute.h | 14 ++--- 3rdparty/taglib/asf/asffile.h | 5 +- 3rdparty/taglib/asf/asfpicture.h | 2 +- 3rdparty/taglib/asf/asfproperties.cpp | 4 -- 3rdparty/taglib/asf/asfproperties.h | 11 +--- 3rdparty/taglib/asf/asftag.h | 2 +- 3rdparty/taglib/audioproperties.h | 12 ++-- 3rdparty/taglib/dsdiff/dsdiffdiintag.cpp | 4 +- 3rdparty/taglib/dsdiff/dsdiffdiintag.h | 4 +- 3rdparty/taglib/dsdiff/dsdifffile.h | 10 ++-- 3rdparty/taglib/dsdiff/dsdiffproperties.h | 4 +- 3rdparty/taglib/dsf/dsffile.h | 8 +-- 3rdparty/taglib/dsf/dsfproperties.h | 6 +- 3rdparty/taglib/fileref.h | 20 ++----- 3rdparty/taglib/flac/flacfile.h | 8 +-- 3rdparty/taglib/flac/flacmetadatablock.h | 12 ++-- 3rdparty/taglib/flac/flacpicture.h | 6 +- 3rdparty/taglib/flac/flacproperties.h | 10 ++-- .../taglib/flac/flacunknownmetadatablock.h | 4 +- 3rdparty/taglib/it/itfile.cpp | 8 --- 3rdparty/taglib/it/itfile.h | 25 ++------ 3rdparty/taglib/it/itproperties.h | 4 +- 3rdparty/taglib/mod/modfile.h | 6 +- 3rdparty/taglib/mod/modfilebase.h | 4 +- 3rdparty/taglib/mod/modproperties.h | 6 +- 3rdparty/taglib/mod/modtag.h | 6 +- 3rdparty/taglib/mp4/mp4atom.h | 6 +- 3rdparty/taglib/mp4/mp4coverart.h | 4 +- 3rdparty/taglib/mp4/mp4file.h | 5 +- 3rdparty/taglib/mp4/mp4item.h | 2 +- 3rdparty/taglib/mp4/mp4properties.h | 8 +-- 3rdparty/taglib/mp4/mp4tag.h | 4 +- 3rdparty/taglib/mpc/mpcfile.h | 8 +-- 3rdparty/taglib/mpc/mpcproperties.h | 14 ++--- 3rdparty/taglib/mpeg/id3v1/id3v1tag.cpp | 11 ++-- 3rdparty/taglib/mpeg/id3v1/id3v1tag.h | 13 ++-- .../mpeg/id3v2/frames/attachedpictureframe.h | 10 ++-- .../taglib/mpeg/id3v2/frames/chapterframe.h | 13 ++-- .../taglib/mpeg/id3v2/frames/commentsframe.h | 4 +- .../mpeg/id3v2/frames/eventtimingcodesframe.h | 6 +- .../frames/generalencapsulatedobjectframe.h | 8 +-- .../taglib/mpeg/id3v2/frames/ownershipframe.h | 4 +- .../taglib/mpeg/id3v2/frames/podcastframe.h | 6 +- .../mpeg/id3v2/frames/popularimeterframe.h | 6 +- .../taglib/mpeg/id3v2/frames/privateframe.h | 8 +-- .../mpeg/id3v2/frames/relativevolumeframe.h | 10 ++-- .../id3v2/frames/synchronizedlyricsframe.h | 6 +- .../id3v2/frames/tableofcontentsframe.cpp | 4 ++ .../mpeg/id3v2/frames/tableofcontentsframe.h | 12 ++-- .../id3v2/frames/textidentificationframe.h | 8 +-- .../id3v2/frames/uniquefileidentifierframe.h | 10 ++-- .../taglib/mpeg/id3v2/frames/unknownframe.h | 6 +- .../id3v2/frames/unsynchronizedlyricsframe.h | 6 +- .../taglib/mpeg/id3v2/frames/urllinkframe.h | 4 +- .../taglib/mpeg/id3v2/id3v2extendedheader.h | 6 +- 3rdparty/taglib/mpeg/id3v2/id3v2footer.h | 6 +- 3rdparty/taglib/mpeg/id3v2/id3v2frame.h | 10 ++-- .../taglib/mpeg/id3v2/id3v2framefactory.h | 12 ++-- 3rdparty/taglib/mpeg/id3v2/id3v2header.h | 8 +-- 3rdparty/taglib/mpeg/id3v2/id3v2tag.h | 11 ++-- 3rdparty/taglib/mpeg/mpegfile.h | 10 ++-- 3rdparty/taglib/mpeg/mpegheader.h | 4 +- 3rdparty/taglib/mpeg/mpegproperties.h | 12 ++-- 3rdparty/taglib/mpeg/xingheader.h | 6 +- 3rdparty/taglib/ogg/flac/oggflacfile.h | 8 +-- 3rdparty/taglib/ogg/oggfile.h | 4 +- 3rdparty/taglib/ogg/oggpage.cpp | 60 ++++++++++++++++++- 3rdparty/taglib/ogg/oggpage.h | 4 +- 3rdparty/taglib/ogg/oggpageheader.h | 6 +- 3rdparty/taglib/ogg/opus/opusfile.h | 8 +-- 3rdparty/taglib/ogg/opus/opusproperties.h | 12 ++-- 3rdparty/taglib/ogg/speex/speexfile.h | 8 +-- 3rdparty/taglib/ogg/speex/speexproperties.h | 12 ++-- 3rdparty/taglib/ogg/vorbis/vorbisfile.h | 8 +-- 3rdparty/taglib/ogg/vorbis/vorbisproperties.h | 10 ++-- 3rdparty/taglib/ogg/xiphcomment.cpp | 4 -- 3rdparty/taglib/ogg/xiphcomment.h | 15 ++--- 3rdparty/taglib/riff/aiff/aifffile.h | 8 +-- 3rdparty/taglib/riff/aiff/aiffproperties.h | 12 ++-- 3rdparty/taglib/riff/rifffile.h | 17 +++--- 3rdparty/taglib/riff/wav/infotag.h | 11 ++-- 3rdparty/taglib/riff/wav/wavfile.h | 8 +-- 3rdparty/taglib/riff/wav/wavproperties.h | 12 ++-- 3rdparty/taglib/s3m/s3mfile.h | 6 +- 3rdparty/taglib/s3m/s3mproperties.h | 6 +- 3rdparty/taglib/tag.h | 14 ++--- 3rdparty/taglib/tagunion.h | 12 ++-- 3rdparty/taglib/toolkit/tbytevector.cpp | 59 ------------------ 3rdparty/taglib/toolkit/tbytevector.h | 42 ++----------- 3rdparty/taglib/toolkit/tbytevectorlist.h | 2 +- 3rdparty/taglib/toolkit/tbytevectorstream.h | 2 +- 3rdparty/taglib/toolkit/tdebuglistener.h | 6 +- 3rdparty/taglib/toolkit/tfile.h | 17 +++--- 3rdparty/taglib/toolkit/tfilestream.h | 4 +- 3rdparty/taglib/toolkit/tiostream.h | 12 ++-- 3rdparty/taglib/toolkit/tlist.h | 2 +- 3rdparty/taglib/toolkit/tlist.tcc | 8 +-- 3rdparty/taglib/toolkit/tmap.h | 2 +- 3rdparty/taglib/toolkit/tmap.tcc | 6 +- 3rdparty/taglib/toolkit/tpropertymap.h | 2 +- 3rdparty/taglib/toolkit/trefcounter.h | 4 +- 3rdparty/taglib/toolkit/tstring.cpp | 10 ---- 3rdparty/taglib/toolkit/tstring.h | 34 +---------- 3rdparty/taglib/toolkit/tstringlist.h | 2 +- 3rdparty/taglib/trueaudio/trueaudiofile.h | 13 ++-- .../taglib/trueaudio/trueaudioproperties.h | 12 ++-- 3rdparty/taglib/wavpack/wavpackfile.cpp | 8 +-- 3rdparty/taglib/wavpack/wavpackfile.h | 10 ++-- 3rdparty/taglib/wavpack/wavpackproperties.h | 12 ++-- 3rdparty/taglib/xm/xmfile.h | 8 +-- 3rdparty/taglib/xm/xmproperties.h | 6 +- 117 files changed, 452 insertions(+), 653 deletions(-) diff --git a/3rdparty/taglib/ape/apefile.h b/3rdparty/taglib/ape/apefile.h index 12fe3b1b4..cd8eea4ab 100644 --- a/3rdparty/taglib/ape/apefile.h +++ b/3rdparty/taglib/ape/apefile.h @@ -92,8 +92,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an APE file from \a stream. @@ -103,8 +102,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -212,7 +210,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); void read(bool readProperties); diff --git a/3rdparty/taglib/ape/apefooter.h b/3rdparty/taglib/ape/apefooter.h index 9bcbf6aa1..b4f9774e1 100644 --- a/3rdparty/taglib/ape/apefooter.h +++ b/3rdparty/taglib/ape/apefooter.h @@ -49,12 +49,12 @@ class TAGLIB_EXPORT Footer { /*! * Constructs an empty APE footer. */ - Footer(); + explicit Footer(); /*! * Constructs an APE footer based on \a data. parse() is called immediately. */ - Footer(const ByteVector &data); + explicit Footer(const ByteVector &data); /*! * Destroys the footer. @@ -161,7 +161,7 @@ class TAGLIB_EXPORT Footer { ByteVector render(bool isHeader) const; private: - Footer(const Footer &); + explicit Footer(const Footer &); Footer &operator=(const Footer &); class FooterPrivate; diff --git a/3rdparty/taglib/ape/apeitem.cpp b/3rdparty/taglib/ape/apeitem.cpp index d02a97d9c..8d50383f1 100644 --- a/3rdparty/taglib/ape/apeitem.cpp +++ b/3rdparty/taglib/ape/apeitem.cpp @@ -48,11 +48,6 @@ class APE::Item::ItemPrivate { APE::Item::Item() : d(new ItemPrivate()) {} -APE::Item::Item(const String &key, const String &value) : d(new ItemPrivate()) { - d->key = key; - d->text.append(value); -} - APE::Item::Item(const String &key, const StringList &values) : d(new ItemPrivate()) { d->key = key; d->text = values; @@ -124,13 +119,6 @@ void APE::Item::setBinaryData(const ByteVector &value) { } -ByteVector APE::Item::value() const { - - // This seems incorrect as it won't be actually rendering the value to keep it up to date. - - return d->value; -} - void APE::Item::setKey(const String &key) { d->key = key; } diff --git a/3rdparty/taglib/ape/apeitem.h b/3rdparty/taglib/ape/apeitem.h index d5cfe17dd..aa975c857 100644 --- a/3rdparty/taglib/ape/apeitem.h +++ b/3rdparty/taglib/ape/apeitem.h @@ -55,29 +55,23 @@ class TAGLIB_EXPORT Item { /*! * Constructs an empty item. */ - Item(); - - /*! - * Constructs a text item with \a key and \a value. - */ - // BIC: Remove this, StringList has a constructor from a single string - Item(const String &key, const String &value); + explicit Item(); /*! * Constructs a text item with \a key and \a values. */ - Item(const String &key, const StringList &values); + explicit Item(const String &key, const StringList &values); /*! * Constructs an item with \a key and \a value. * If \a binary is true a Binary item will be created, otherwise \a value will be interpreted as text */ - Item(const String &key, const ByteVector &value, bool binary); + explicit Item(const String &key, const ByteVector &value, bool binary); /*! * Construct an item as a copy of \a item. */ - Item(const Item &item); + explicit Item(const Item &item); /*! * Destroys the item. @@ -111,11 +105,6 @@ class TAGLIB_EXPORT Item { */ void setBinaryData(const ByteVector &value); -#ifndef DO_NOT_DOCUMENT - /* Remove in next binary incompatible release */ - ByteVector value() const; -#endif - /*! * Sets the key for the item to \a key. */ diff --git a/3rdparty/taglib/ape/apeproperties.h b/3rdparty/taglib/ape/apeproperties.h index 9c1ea2459..b5a9aa7dd 100644 --- a/3rdparty/taglib/ape/apeproperties.h +++ b/3rdparty/taglib/ape/apeproperties.h @@ -51,7 +51,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of APE::AudioProperties with the data read from the APE::File \a file. */ - AudioProperties(File *file, long streamLength, ReadStyle style = Average); + explicit AudioProperties(File *file, long streamLength, ReadStyle style = Average); /*! * Destroys this APE::AudioProperties instance. @@ -63,16 +63,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -105,7 +103,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int version() const; private: - AudioProperties(const AudioProperties &); + explicit AudioProperties(const AudioProperties &); AudioProperties &operator=(const AudioProperties &); void read(File *file, long streamLength); diff --git a/3rdparty/taglib/ape/apetag.h b/3rdparty/taglib/ape/apetag.h index c742f4196..50c60a541 100644 --- a/3rdparty/taglib/ape/apetag.h +++ b/3rdparty/taglib/ape/apetag.h @@ -60,13 +60,13 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { /*! * Create an APE tag with default values. */ - Tag(); + explicit Tag(); /*! * Create an APE tag and parse the data in \a file with APE footer at * \a tagOffset. */ - Tag(Strawberry_TagLib::TagLib::File *file, long footerLocation); + explicit Tag(Strawberry_TagLib::TagLib::File *file, long footerLocation); /*! * Destroys this Tag instance. @@ -190,7 +190,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { void parse(const ByteVector &data); private: - Tag(const Tag &); + explicit Tag(const Tag &); Tag &operator=(const Tag &); class TagPrivate; diff --git a/3rdparty/taglib/asf/asfattribute.h b/3rdparty/taglib/asf/asfattribute.h index a06fe2cd7..4b9ec6aeb 100644 --- a/3rdparty/taglib/asf/asfattribute.h +++ b/3rdparty/taglib/asf/asfattribute.h @@ -56,7 +56,7 @@ class TAGLIB_EXPORT Attribute { /*! * Constructs an empty attribute. */ - Attribute(); + explicit Attribute(); /*! * Constructs an attribute with \a key and a UnicodeType \a value. @@ -66,7 +66,7 @@ class TAGLIB_EXPORT Attribute { /*! * Constructs an attribute with \a key and a BytesType \a value. */ - Attribute(const ByteVector &value); + explicit Attribute(const ByteVector &value); /*! * Constructs an attribute with \a key and a Picture \a value. @@ -79,27 +79,27 @@ class TAGLIB_EXPORT Attribute { * WM/Picture attributes added with TagLib::ASF are not automatically validated to conform to ID3 specifications. * You must add code in your application to perform validations if you want to maintain complete compatibility with ID3. */ - Attribute(const Picture &value); + explicit Attribute(const Picture &value); /*! * Constructs an attribute with \a key and a DWordType \a value. */ - Attribute(unsigned int value); + explicit Attribute(unsigned int value); /*! * Constructs an attribute with \a key and a QWordType \a value. */ - Attribute(unsigned long long value); + explicit Attribute(unsigned long long value); /*! * Constructs an attribute with \a key and a WordType \a value. */ - Attribute(unsigned short value); + explicit Attribute(unsigned short value); /*! * Constructs an attribute with \a key and a BoolType \a value. */ - Attribute(bool value); + explicit Attribute(bool value); /*! * Construct an attribute as a copy of \a other. diff --git a/3rdparty/taglib/asf/asffile.h b/3rdparty/taglib/asf/asffile.h index a49e440b3..e29984f3b 100644 --- a/3rdparty/taglib/asf/asffile.h +++ b/3rdparty/taglib/asf/asffile.h @@ -53,8 +53,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * \a propertiesStyle are ignored. The audio properties are always * read. */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an ASF file from \a stream. @@ -66,7 +65,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * \note TagLib will *not* take ownership of the stream, the caller is * responsible for deleting it after the File object. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. diff --git a/3rdparty/taglib/asf/asfpicture.h b/3rdparty/taglib/asf/asfpicture.h index 854390d83..5158dc09d 100644 --- a/3rdparty/taglib/asf/asfpicture.h +++ b/3rdparty/taglib/asf/asfpicture.h @@ -97,7 +97,7 @@ class TAGLIB_EXPORT Picture { /*! * Constructs an empty picture. */ - Picture(); + explicit Picture(); /*! * Construct an picture as a copy of \a other. diff --git a/3rdparty/taglib/asf/asfproperties.cpp b/3rdparty/taglib/asf/asfproperties.cpp index fa2118270..331c7084c 100644 --- a/3rdparty/taglib/asf/asfproperties.cpp +++ b/3rdparty/taglib/asf/asfproperties.cpp @@ -106,10 +106,6 @@ bool ASF::AudioProperties::isEncrypted() const { // private members //////////////////////////////////////////////////////////////////////////////// -void ASF::AudioProperties::setLength(int /*length*/) { - debug("ASF::AudioProperties::setLength() -- This method is deprecated. Do not use."); -} - void ASF::AudioProperties::setLengthInMilliseconds(int value) { d->length = value; } diff --git a/3rdparty/taglib/asf/asfproperties.h b/3rdparty/taglib/asf/asfproperties.h index 2a00193d2..38321f7bc 100644 --- a/3rdparty/taglib/asf/asfproperties.h +++ b/3rdparty/taglib/asf/asfproperties.h @@ -70,7 +70,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Creates an instance of ASF::Properties. */ - AudioProperties(); + explicit AudioProperties(); /*! * Destroys this ASF::AudioProperties instance. @@ -83,16 +83,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -145,9 +143,6 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro bool isEncrypted() const; #ifndef DO_NOT_DOCUMENT - // deprecated - void setLength(int value); - void setLengthInMilliseconds(int value); void setBitrate(int value); void setSampleRate(int value); diff --git a/3rdparty/taglib/asf/asftag.h b/3rdparty/taglib/asf/asftag.h index 0a9bfccf4..9552c4d06 100644 --- a/3rdparty/taglib/asf/asftag.h +++ b/3rdparty/taglib/asf/asftag.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { friend class File; public: - Tag(); + explicit Tag(); virtual ~Tag(); diff --git a/3rdparty/taglib/audioproperties.h b/3rdparty/taglib/audioproperties.h index 0d8a59149..f33b7d693 100644 --- a/3rdparty/taglib/audioproperties.h +++ b/3rdparty/taglib/audioproperties.h @@ -67,16 +67,14 @@ class TAGLIB_EXPORT AudioProperties { * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. @@ -102,11 +100,11 @@ class TAGLIB_EXPORT AudioProperties { * * \see ReadStyle */ - AudioProperties(ReadStyle style); + explicit AudioProperties(ReadStyle style); private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); class AudioPropertiesPrivate; AudioPropertiesPrivate *d; diff --git a/3rdparty/taglib/dsdiff/dsdiffdiintag.cpp b/3rdparty/taglib/dsdiff/dsdiffdiintag.cpp index 6a379e218..52df712b0 100644 --- a/3rdparty/taglib/dsdiff/dsdiffdiintag.cpp +++ b/3rdparty/taglib/dsdiff/dsdiffdiintag.cpp @@ -77,7 +77,7 @@ unsigned int DSDIFF::DIIN::Tag::track() const { void DSDIFF::DIIN::Tag::setTitle(const String &title) { - if (title.isNull() || title.isEmpty()) + if (title.isEmpty()) d->title = String(); else d->title = title; @@ -86,7 +86,7 @@ void DSDIFF::DIIN::Tag::setTitle(const String &title) { void DSDIFF::DIIN::Tag::setArtist(const String &artist) { - if (artist.isNull() || artist.isEmpty()) + if (artist.isEmpty()) d->artist = String(); else d->artist = artist; diff --git a/3rdparty/taglib/dsdiff/dsdiffdiintag.h b/3rdparty/taglib/dsdiff/dsdiffdiintag.h index 66c2eb221..a3e614171 100644 --- a/3rdparty/taglib/dsdiff/dsdiffdiintag.h +++ b/3rdparty/taglib/dsdiff/dsdiffdiintag.h @@ -41,7 +41,7 @@ namespace DIIN { class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { public: - Tag(); + explicit Tag(); virtual ~Tag(); /*! @@ -130,7 +130,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { PropertyMap setProperties(const PropertyMap &); private: - Tag(const Tag &); + explicit Tag(const Tag &); Tag &operator=(const Tag &); class TagPrivate; diff --git a/3rdparty/taglib/dsdiff/dsdifffile.h b/3rdparty/taglib/dsdiff/dsdifffile.h index ea9630b7f..d638e5cd2 100644 --- a/3rdparty/taglib/dsdiff/dsdifffile.h +++ b/3rdparty/taglib/dsdiff/dsdifffile.h @@ -80,7 +80,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an DSDIFF file from \a stream. @@ -90,8 +90,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -210,7 +209,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { File(IOStream *stream, Endianness endianness); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); void removeRootChunk(const ByteVector &id); @@ -249,8 +248,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \warning This will update the file immediately. */ - void setChildChunkData(const ByteVector &name, const ByteVector &data, - unsigned int childChunkNum); + void setChildChunkData(const ByteVector &name, const ByteVector &data, unsigned int childChunkNum); void updateRootChunksStructure(unsigned int startingChunk); diff --git a/3rdparty/taglib/dsdiff/dsdiffproperties.h b/3rdparty/taglib/dsdiff/dsdiffproperties.h index d00be1ab1..cd079857d 100644 --- a/3rdparty/taglib/dsdiff/dsdiffproperties.h +++ b/3rdparty/taglib/dsdiff/dsdiffproperties.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of DSDIFF::AudioProperties with the data read from the ByteVector \a data. */ - AudioProperties(const unsigned int sampleRate, const unsigned short channels, const unsigned long long samplesCount, const int bitrate, ReadStyle style); + explicit AudioProperties(const unsigned int sampleRate, const unsigned short channels, const unsigned long long samplesCount, const int bitrate, ReadStyle style); /*! * Destroys this DSDIFF::AudioProperties instance. @@ -64,7 +64,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro long long sampleCount() const; private: - AudioProperties(const AudioProperties &); + explicit AudioProperties(const AudioProperties &); AudioProperties &operator=(const AudioProperties &); class AudioPropertiesPrivate; diff --git a/3rdparty/taglib/dsf/dsffile.h b/3rdparty/taglib/dsf/dsffile.h index a7a899d19..9c777c0f8 100644 --- a/3rdparty/taglib/dsf/dsffile.h +++ b/3rdparty/taglib/dsf/dsffile.h @@ -59,16 +59,14 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * If \a readProperties is true the file's audio properties will also be read using \a propertiesStyle. * If false, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an DSF file from \a file. * If \a readProperties is true the file's audio properties will also be read using \a propertiesStyle. * If false, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -112,7 +110,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); void read(bool readProperties, AudioProperties::ReadStyle propertiesStyle); diff --git a/3rdparty/taglib/dsf/dsfproperties.h b/3rdparty/taglib/dsf/dsfproperties.h index dec58e4c6..0bcb998ec 100644 --- a/3rdparty/taglib/dsf/dsfproperties.h +++ b/3rdparty/taglib/dsf/dsfproperties.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of DSF::AudioProperties with the data read from the ByteVector \a data. */ - AudioProperties(const ByteVector &data, ReadStyle style); + explicit AudioProperties(const ByteVector &data, ReadStyle style); /*! * Destroys this DSF::AudioProperties instance. @@ -79,8 +79,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int blockSizePerChannel() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(const ByteVector &data); diff --git a/3rdparty/taglib/fileref.h b/3rdparty/taglib/fileref.h index d7efc5721..a7e026462 100644 --- a/3rdparty/taglib/fileref.h +++ b/3rdparty/taglib/fileref.h @@ -93,15 +93,13 @@ class TAGLIB_EXPORT FileRef { * \note The created file is then owned by the FileRef and should not be deleted. * Deletion will happen automatically when the FileRef passes out of scope. */ - virtual File *createFile(FileName fileName, - bool readAudioProperties = true, - AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average) const = 0; + virtual File *createFile(FileName fileName, bool readAudioProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average) const = 0; }; /*! * Creates a null FileRef. */ - FileRef(); + explicit FileRef(); /*! * Create a FileRef from \a fileName. @@ -111,10 +109,7 @@ class TAGLIB_EXPORT FileRef { * Also see the note in the class documentation about why you may not want to * use this method in your application. */ - explicit FileRef(FileName fileName, - bool readAudioProperties = true, - AudioProperties::ReadStyle - audioPropertiesStyle = AudioProperties::Average); + explicit FileRef(FileName fileName, bool readAudioProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); /*! * Construct a FileRef from an opened \a IOStream. @@ -125,10 +120,7 @@ class TAGLIB_EXPORT FileRef { * * \note TagLib will *not* take ownership of the stream, the caller is responsible for deleting it after the File object. */ - explicit FileRef(IOStream *stream, - bool readAudioProperties = true, - AudioProperties::ReadStyle - audioPropertiesStyle = AudioProperties::Average); + explicit FileRef(IOStream *stream, bool readAudioProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); /*! * Construct a FileRef using \a file. @@ -250,9 +242,7 @@ class TAGLIB_EXPORT FileRef { * * \deprecated */ - static File *create(FileName fileName, - bool readAudioProperties = true, - AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); + static File *create(FileName fileName, bool readAudioProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); private: void parse(FileName fileName, bool readAudioProperties, AudioProperties::ReadStyle audioPropertiesStyle); diff --git a/3rdparty/taglib/flac/flacfile.h b/3rdparty/taglib/flac/flacfile.h index f20041109..b21a9bf39 100644 --- a/3rdparty/taglib/flac/flacfile.h +++ b/3rdparty/taglib/flac/flacfile.h @@ -97,7 +97,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a FLAC file from \a stream. If \a readProperties is true the file's audio properties will also be read. @@ -109,7 +109,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * \note In the current implementation, \a propertiesStyle is ignored. */ // BIC: merge with the above constructor - File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -269,8 +269,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); void scan(); diff --git a/3rdparty/taglib/flac/flacmetadatablock.h b/3rdparty/taglib/flac/flacmetadatablock.h index d3221a22a..b24ebe65c 100644 --- a/3rdparty/taglib/flac/flacmetadatablock.h +++ b/3rdparty/taglib/flac/flacmetadatablock.h @@ -36,7 +36,7 @@ namespace FLAC { class TAGLIB_EXPORT MetadataBlock { public: - MetadataBlock(); + explicit MetadataBlock(); virtual ~MetadataBlock(); enum BlockType { @@ -50,17 +50,17 @@ class TAGLIB_EXPORT MetadataBlock { }; /*! - * Returns the FLAC metadata block type. - */ + * Returns the FLAC metadata block type. + */ virtual int code() const = 0; /*! - * Render the content of the block. - */ + * Render the content of the block. + */ virtual ByteVector render() const = 0; private: - MetadataBlock(const MetadataBlock &item); + explicit MetadataBlock(const MetadataBlock &item); MetadataBlock &operator=(const MetadataBlock &item); class MetadataBlockPrivate; diff --git a/3rdparty/taglib/flac/flacpicture.h b/3rdparty/taglib/flac/flacpicture.h index 19b99344c..1dcb805b0 100644 --- a/3rdparty/taglib/flac/flacpicture.h +++ b/3rdparty/taglib/flac/flacpicture.h @@ -87,8 +87,8 @@ class TAGLIB_EXPORT Picture : public MetadataBlock { PublisherLogo = 0x14 }; - Picture(); - Picture(const ByteVector &data); + explicit Picture(); + explicit Picture(const ByteVector &data); ~Picture(); /*! @@ -189,7 +189,7 @@ class TAGLIB_EXPORT Picture : public MetadataBlock { bool parse(const ByteVector &rawData); private: - Picture(const Picture &item); + explicit Picture(const Picture &item); Picture &operator=(const Picture &item); class PicturePrivate; diff --git a/3rdparty/taglib/flac/flacproperties.h b/3rdparty/taglib/flac/flacproperties.h index 2c1ee2f47..b3d4cc282 100644 --- a/3rdparty/taglib/flac/flacproperties.h +++ b/3rdparty/taglib/flac/flacproperties.h @@ -47,7 +47,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of FLAC::AudioProperties with the data read from the ByteVector \a data. */ - AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average); + explicit AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average); /*! * Destroys this FLAC::AudioProperties instance. @@ -59,16 +59,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -101,7 +99,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro ByteVector signature() const; private: - AudioProperties(const AudioProperties &); + explicit AudioProperties(const AudioProperties &); AudioProperties &operator=(const AudioProperties &); void read(const ByteVector &data, long streamLength); diff --git a/3rdparty/taglib/flac/flacunknownmetadatablock.h b/3rdparty/taglib/flac/flacunknownmetadatablock.h index 972829d10..d23375382 100644 --- a/3rdparty/taglib/flac/flacunknownmetadatablock.h +++ b/3rdparty/taglib/flac/flacunknownmetadatablock.h @@ -37,7 +37,7 @@ namespace FLAC { class TAGLIB_EXPORT UnknownMetadataBlock : public MetadataBlock { public: - UnknownMetadataBlock(int code, const ByteVector &data); + explicit UnknownMetadataBlock(int code, const ByteVector &data); ~UnknownMetadataBlock(); /*! @@ -66,7 +66,7 @@ class TAGLIB_EXPORT UnknownMetadataBlock : public MetadataBlock { ByteVector render() const; private: - UnknownMetadataBlock(const MetadataBlock &item); + explicit UnknownMetadataBlock(const MetadataBlock &item); UnknownMetadataBlock &operator=(const MetadataBlock &item); class UnknownMetadataBlockPrivate; diff --git a/3rdparty/taglib/it/itfile.cpp b/3rdparty/taglib/it/itfile.cpp index 23888d498..2ade04dd8 100644 --- a/3rdparty/taglib/it/itfile.cpp +++ b/3rdparty/taglib/it/itfile.cpp @@ -65,14 +65,6 @@ Mod::Tag *IT::File::tag() const { return &d->tag; } -PropertyMap IT::File::properties() const { - return d->tag.properties(); -} - -PropertyMap IT::File::setProperties(const PropertyMap &properties) { - return d->tag.setProperties(properties); -} - IT::AudioProperties *IT::File::audioProperties() const { return &d->properties; } diff --git a/3rdparty/taglib/it/itfile.h b/3rdparty/taglib/it/itfile.h index 05bdd2b01..f224149b8 100644 --- a/3rdparty/taglib/it/itfile.h +++ b/3rdparty/taglib/it/itfile.h @@ -41,9 +41,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { * \note In the current implementation, both \a readProperties and \a propertiesStyle are ignored. * The audio properties are always read. */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = - AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a Impulse Tracker file from \a stream. @@ -53,9 +51,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { * * \note TagLib will *not* take ownership of the stream, the caller is responsible for deleting it after the File object. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = - AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -64,18 +60,6 @@ class TAGLIB_EXPORT File : public Mod::FileBase { Mod::Tag *tag() const; - /*! - * Forwards to Mod::Tag::properties(). - * BIC: will be removed once File::toDict() is made virtual - */ - PropertyMap properties() const; - - /*! - * Forwards to Mod::Tag::setProperties(). - * BIC: will be removed once File::setProperties() is made virtual - */ - PropertyMap setProperties(const PropertyMap &); - /*! * Returns the IT::AudioProperties for this file. If no audio properties * were read then this will return a null pointer. @@ -90,10 +74,9 @@ class TAGLIB_EXPORT File : public Mod::FileBase { */ bool save(); - private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/it/itproperties.h b/3rdparty/taglib/it/itproperties.h index ed9926416..325ca6de0 100644 --- a/3rdparty/taglib/it/itproperties.h +++ b/3rdparty/taglib/it/itproperties.h @@ -54,7 +54,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro MidiConfEmbedded = 8 }; - AudioProperties(AudioProperties::ReadStyle propertiesStyle); + explicit AudioProperties(AudioProperties::ReadStyle propertiesStyle); virtual ~AudioProperties(); int lengthInSeconds() const; @@ -96,7 +96,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro void setPitchWheelDepth(unsigned char pitchWheelDepth); private: - AudioProperties(const AudioProperties &); + explicit AudioProperties(const AudioProperties &); AudioProperties &operator=(const AudioProperties &); class AudioPropertiesPrivate; diff --git a/3rdparty/taglib/mod/modfile.h b/3rdparty/taglib/mod/modfile.h index 18586e9a5..fbe3d269f 100644 --- a/3rdparty/taglib/mod/modfile.h +++ b/3rdparty/taglib/mod/modfile.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::Mod::FileBase { * \note In the current implementation, both \a readProperties and \a propertiesStyle are ignored. * The audio properties are always read. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a Protracker file from \a stream. @@ -56,7 +56,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::Mod::FileBase { * \note TagLib will *not* take ownership of the stream, the caller is * responsible for deleting it after the File object. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -90,7 +90,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::Mod::FileBase { bool save(); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); void read(bool readProperties); diff --git a/3rdparty/taglib/mod/modfilebase.h b/3rdparty/taglib/mod/modfilebase.h index f93ad01b8..9f857404b 100644 --- a/3rdparty/taglib/mod/modfilebase.h +++ b/3rdparty/taglib/mod/modfilebase.h @@ -40,8 +40,8 @@ namespace Mod { class TAGLIB_EXPORT FileBase : public Strawberry_TagLib::TagLib::File { protected: - FileBase(FileName file); - FileBase(IOStream *stream); + explicit FileBase(FileName file); + explicit FileBase(IOStream *stream); void writeString(const String &s, unsigned long size, char padding = 0); void writeByte(unsigned char byte); diff --git a/3rdparty/taglib/mod/modproperties.h b/3rdparty/taglib/mod/modproperties.h index 5d535aaab..4f4c9c7ef 100644 --- a/3rdparty/taglib/mod/modproperties.h +++ b/3rdparty/taglib/mod/modproperties.h @@ -35,7 +35,7 @@ namespace Mod { class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioProperties { public: - AudioProperties(AudioProperties::ReadStyle propertiesStyle); + explicit AudioProperties(AudioProperties::ReadStyle propertiesStyle); virtual ~AudioProperties(); int lengthInSeconds() const; @@ -55,8 +55,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro private: friend class File; - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); class AudioPropertiesPrivate; AudioPropertiesPrivate *d; diff --git a/3rdparty/taglib/mod/modtag.h b/3rdparty/taglib/mod/modtag.h index d443d9615..bd285be49 100644 --- a/3rdparty/taglib/mod/modtag.h +++ b/3rdparty/taglib/mod/modtag.h @@ -46,7 +46,7 @@ namespace Mod { */ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { public: - Tag(); + explicit Tag(); virtual ~Tag(); /*! @@ -168,8 +168,8 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { PropertyMap setProperties(const PropertyMap &); private: - Tag(const Tag &); - Tag &operator=(const Tag &); + explicit Tag(const Tag&); + Tag &operator=(const Tag&); class TagPrivate; TagPrivate *d; diff --git a/3rdparty/taglib/mp4/mp4atom.h b/3rdparty/taglib/mp4/mp4atom.h index b8085f3bb..fb86f28cd 100644 --- a/3rdparty/taglib/mp4/mp4atom.h +++ b/3rdparty/taglib/mp4/mp4atom.h @@ -65,7 +65,7 @@ enum AtomDataType { }; struct AtomData { - AtomData(AtomDataType _type, ByteVector _data) : type(_type), locale(0), data(_data) {} + explicit AtomData(AtomDataType _type, ByteVector _data) : type(_type), locale(0), data(_data) {} AtomDataType type; int locale; ByteVector data; @@ -75,7 +75,7 @@ typedef Strawberry_TagLib::TagLib::List AtomDataList; class Atom { public: - Atom(File *file); + explicit Atom(File *file); ~Atom(); Atom *find(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0); @@ -94,7 +94,7 @@ class Atom { //! Root-level atoms class Atoms { public: - Atoms(File *file); + explicit Atoms(File *file); ~Atoms(); Atom *find(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0); diff --git a/3rdparty/taglib/mp4/mp4coverart.h b/3rdparty/taglib/mp4/mp4coverart.h index 93d1f8109..f6fafc665 100644 --- a/3rdparty/taglib/mp4/mp4coverart.h +++ b/3rdparty/taglib/mp4/mp4coverart.h @@ -48,10 +48,10 @@ class TAGLIB_EXPORT CoverArt { Unknown = TypeImplicit, }; - CoverArt(Format format, const ByteVector &data); + explicit CoverArt(Format format, const ByteVector &data); ~CoverArt(); - CoverArt(const CoverArt &item); + explicit CoverArt(const CoverArt &item); /*! * Copies the contents of \a item into this CoverArt. diff --git a/3rdparty/taglib/mp4/mp4file.h b/3rdparty/taglib/mp4/mp4file.h index 9d97381f4..1c5e4c322 100644 --- a/3rdparty/taglib/mp4/mp4file.h +++ b/3rdparty/taglib/mp4/mp4file.h @@ -54,7 +54,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); /*! * Constructs an MP4 file from \a stream. @@ -65,8 +65,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. diff --git a/3rdparty/taglib/mp4/mp4item.h b/3rdparty/taglib/mp4/mp4item.h index b53088ce5..4be0b83a0 100644 --- a/3rdparty/taglib/mp4/mp4item.h +++ b/3rdparty/taglib/mp4/mp4item.h @@ -40,7 +40,7 @@ class TAGLIB_EXPORT Item { int first, second; }; - Item(); + explicit Item(); Item(const Item &item); /*! diff --git a/3rdparty/taglib/mp4/mp4properties.h b/3rdparty/taglib/mp4/mp4properties.h index d9feb0ad0..c2d145b93 100644 --- a/3rdparty/taglib/mp4/mp4properties.h +++ b/3rdparty/taglib/mp4/mp4properties.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro ALAC }; - AudioProperties(File *file, Atoms *atoms, ReadStyle style = Average); + explicit AudioProperties(File *file, Atoms *atoms, ReadStyle style = Average); virtual ~AudioProperties(); /*! @@ -53,16 +53,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. diff --git a/3rdparty/taglib/mp4/mp4tag.h b/3rdparty/taglib/mp4/mp4tag.h index e7d1ed986..0089d6ef9 100644 --- a/3rdparty/taglib/mp4/mp4tag.h +++ b/3rdparty/taglib/mp4/mp4tag.h @@ -43,8 +43,8 @@ typedef Strawberry_TagLib::TagLib::Map ItemMap; class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { public: - Tag(); - Tag(Strawberry_TagLib::TagLib::File *file, Atoms *atoms); + explicit Tag(); + explicit Tag(Strawberry_TagLib::TagLib::File *file, Atoms *atoms); virtual ~Tag(); bool save(); diff --git a/3rdparty/taglib/mpc/mpcfile.h b/3rdparty/taglib/mpc/mpcfile.h index 9ca8c0c2f..39d3437f6 100644 --- a/3rdparty/taglib/mpc/mpcfile.h +++ b/3rdparty/taglib/mpc/mpcfile.h @@ -89,7 +89,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an MPC file from \a stream. @@ -99,7 +99,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -205,8 +205,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/mpc/mpcproperties.h b/3rdparty/taglib/mpc/mpcproperties.h index 19a5d7146..79bc40978 100644 --- a/3rdparty/taglib/mpc/mpcproperties.h +++ b/3rdparty/taglib/mpc/mpcproperties.h @@ -51,12 +51,12 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * This constructor is deprecated. It only works for MPC version up to 7. */ - AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average); + explicit AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average); /*! * Create an instance of MPC::AudioProperties with the data read directly from a MPC::File. */ - AudioProperties(File *file, long streamLength, ReadStyle style = Average); + explicit AudioProperties(File *file, long streamLength, ReadStyle style = Average); /*! * Destroys this MPC::AudioProperties instance. @@ -69,16 +69,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -130,8 +128,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int albumPeak() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void readSV7(const ByteVector &data, long streamLength); void readSV8(File *file, long streamLength); diff --git a/3rdparty/taglib/mpeg/id3v1/id3v1tag.cpp b/3rdparty/taglib/mpeg/id3v1/id3v1tag.cpp index 4720dfc41..5d7858d26 100644 --- a/3rdparty/taglib/mpeg/id3v1/id3v1tag.cpp +++ b/3rdparty/taglib/mpeg/id3v1/id3v1tag.cpp @@ -39,10 +39,10 @@ const ID3v1::StringHandler *stringHandler = &defaultStringHandler; class ID3v1::Tag::TagPrivate { public: - TagPrivate() : file(nullptr), - tagOffset(0), - track(0), - genre(255) {} + explicit TagPrivate() : file(nullptr), + tagOffset(0), + track(0), + genre(255) {} File *file; long tagOffset; @@ -60,8 +60,7 @@ class ID3v1::Tag::TagPrivate { // StringHandler implementation //////////////////////////////////////////////////////////////////////////////// -StringHandler::StringHandler() { -} +StringHandler::StringHandler() {} String ID3v1::StringHandler::parse(const ByteVector &data) const { return String(data, String::Latin1).stripWhiteSpace(); diff --git a/3rdparty/taglib/mpeg/id3v1/id3v1tag.h b/3rdparty/taglib/mpeg/id3v1/id3v1tag.h index 325ba24e6..86046121f 100644 --- a/3rdparty/taglib/mpeg/id3v1/id3v1tag.h +++ b/3rdparty/taglib/mpeg/id3v1/id3v1tag.h @@ -55,11 +55,10 @@ namespace ID3v1 { */ class TAGLIB_EXPORT StringHandler { - TAGLIB_IGNORE_MISSING_DESTRUCTOR public: - // BIC: Add virtual destructor. - StringHandler(); + explicit StringHandler(); + virtual ~StringHandler() = default; /*! * Decode a string from \a data. @@ -102,12 +101,12 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { /*! * Create an ID3v1 tag with default values. */ - Tag(); + explicit Tag(); /*! * Create an ID3v1 tag and parse the data in \a file starting at \a tagOffset. */ - Tag(File *file, long tagOffset); + explicit Tag(File *file, long tagOffset); /*! * Destroys this Tag instance. @@ -177,8 +176,8 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { void parse(const ByteVector &data); private: - Tag(const Tag &); - Tag &operator=(const Tag &); + explicit Tag(const Tag&); + Tag &operator=(const Tag&); class TagPrivate; TagPrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/attachedpictureframe.h b/3rdparty/taglib/mpeg/id3v2/frames/attachedpictureframe.h index 4ca003e23..edfefee0f 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/attachedpictureframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/attachedpictureframe.h @@ -98,7 +98,7 @@ class TAGLIB_EXPORT AttachedPictureFrame : public Frame { * Constructs an empty picture frame. * The description, content and text encoding should be set manually. */ - AttachedPictureFrame(); + explicit AttachedPictureFrame(); /*! * Constructs an AttachedPicture frame based on \a data. @@ -204,9 +204,9 @@ class TAGLIB_EXPORT AttachedPictureFrame : public Frame { AttachedPictureFramePrivate *d; private: - AttachedPictureFrame(const AttachedPictureFrame &); - AttachedPictureFrame &operator=(const AttachedPictureFrame &); - AttachedPictureFrame(const ByteVector &data, Header *h); + explicit AttachedPictureFrame(const AttachedPictureFrame&); + AttachedPictureFrame &operator=(const AttachedPictureFrame&); + explicit AttachedPictureFrame(const ByteVector &data, Header *h); }; //! support for ID3v2.2 PIC frames @@ -215,7 +215,7 @@ class TAGLIB_EXPORT AttachedPictureFrameV22 : public AttachedPictureFrame { virtual void parseFields(const ByteVector &data); private: - AttachedPictureFrameV22(const ByteVector &data, Header *h); + explicit AttachedPictureFrameV22(const ByteVector &data, Header *h); friend class FrameFactory; }; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h b/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h index dab0bf560..724c23612 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/chapterframe.h @@ -49,7 +49,7 @@ class TAGLIB_EXPORT ChapterFrame : public ID3v2::Frame { * Creates a chapter frame based on \a data. * \a tagHeader is required as the internal frames are parsed based on the tag version. */ - ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data); + explicit ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data); /*! * Creates a chapter frame with the element ID \a elementID, @@ -59,10 +59,7 @@ class TAGLIB_EXPORT ChapterFrame : public ID3v2::Frame { * * All times are in milliseconds. */ - ChapterFrame(const ByteVector &elementID, - unsigned int startTime, unsigned int endTime, - unsigned int startOffset, unsigned int endOffset, - const FrameList &embeddedFrames = FrameList()); + explicit ChapterFrame(const ByteVector &elementID, unsigned int startTime, unsigned int endTime, unsigned int startOffset, unsigned int endOffset, const FrameList &embeddedFrames = FrameList()); /*! * Destroys the frame. @@ -221,9 +218,9 @@ class TAGLIB_EXPORT ChapterFrame : public ID3v2::Frame { virtual ByteVector renderFields() const; private: - ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); - ChapterFrame(const ChapterFrame &); - ChapterFrame &operator=(const ChapterFrame &); + explicit ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); + explicit ChapterFrame(const ChapterFrame&); + ChapterFrame &operator=(const ChapterFrame&); class ChapterFramePrivate; ChapterFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h index e99698c33..6472e593b 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/commentsframe.h @@ -161,8 +161,8 @@ class TAGLIB_EXPORT CommentsFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - CommentsFrame(const ByteVector &data, Header *h); - CommentsFrame(const CommentsFrame &); + explicit CommentsFrame(const ByteVector &data, Header *h); + explicit CommentsFrame(const CommentsFrame &); CommentsFrame &operator=(const CommentsFrame &); class CommentsFramePrivate; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h b/3rdparty/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h index 97bb2e6a5..1991e5e57 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h @@ -170,9 +170,9 @@ class TAGLIB_EXPORT EventTimingCodesFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - EventTimingCodesFrame(const ByteVector &data, Header *h); - EventTimingCodesFrame(const EventTimingCodesFrame &); - EventTimingCodesFrame &operator=(const EventTimingCodesFrame &); + explicit EventTimingCodesFrame(const ByteVector &data, Header *h); + explicit EventTimingCodesFrame(const EventTimingCodesFrame&); + EventTimingCodesFrame &operator=(const EventTimingCodesFrame&); class EventTimingCodesFramePrivate; EventTimingCodesFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h b/3rdparty/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h index 20d9495f2..7878c6747 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h @@ -56,7 +56,7 @@ class TAGLIB_EXPORT GeneralEncapsulatedObjectFrame : public Frame { * Constructs an empty object frame. * The description, file name and text encoding should be set manually. */ - GeneralEncapsulatedObjectFrame(); + explicit GeneralEncapsulatedObjectFrame(); /*! * Constructs a GeneralEncapsulatedObjectFrame frame based on \a data. @@ -164,9 +164,9 @@ class TAGLIB_EXPORT GeneralEncapsulatedObjectFrame : public Frame { virtual ByteVector renderFields() const; private: - GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h); - GeneralEncapsulatedObjectFrame(const GeneralEncapsulatedObjectFrame &); - GeneralEncapsulatedObjectFrame &operator=(const GeneralEncapsulatedObjectFrame &); + explicit GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h); + explicit GeneralEncapsulatedObjectFrame(const GeneralEncapsulatedObjectFrame&); + GeneralEncapsulatedObjectFrame &operator=(const GeneralEncapsulatedObjectFrame&); class GeneralEncapsulatedObjectFramePrivate; GeneralEncapsulatedObjectFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/ownershipframe.h b/3rdparty/taglib/mpeg/id3v2/frames/ownershipframe.h index dce2ec2e6..9b2ac0357 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/ownershipframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/ownershipframe.h @@ -135,8 +135,8 @@ class TAGLIB_EXPORT OwnershipFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - OwnershipFrame(const ByteVector &data, Header *h); - OwnershipFrame(const OwnershipFrame &); + explicit OwnershipFrame(const ByteVector &data, Header *h); + explicit OwnershipFrame(const OwnershipFrame&); OwnershipFrame &operator=(const OwnershipFrame &); class OwnershipFramePrivate; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/podcastframe.h b/3rdparty/taglib/mpeg/id3v2/frames/podcastframe.h index 8ae29cd73..012dd6e18 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/podcastframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/podcastframe.h @@ -44,7 +44,7 @@ class TAGLIB_EXPORT PodcastFrame : public Frame { /*! * Construct a podcast frame. */ - PodcastFrame(); + explicit PodcastFrame(); /*! * Destroys this PodcastFrame instance. @@ -66,8 +66,8 @@ class TAGLIB_EXPORT PodcastFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - PodcastFrame(const ByteVector &data, Header *h); - PodcastFrame(const PodcastFrame &); + explicit PodcastFrame(const ByteVector &data, Header *h); + explicit PodcastFrame(const PodcastFrame &); PodcastFrame &operator=(const PodcastFrame &); class PodcastFramePrivate; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/popularimeterframe.h b/3rdparty/taglib/mpeg/id3v2/frames/popularimeterframe.h index 693970028..287098de7 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/popularimeterframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/popularimeterframe.h @@ -118,9 +118,9 @@ class TAGLIB_EXPORT PopularimeterFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - PopularimeterFrame(const ByteVector &data, Header *h); - PopularimeterFrame(const PopularimeterFrame &); - PopularimeterFrame &operator=(const PopularimeterFrame &); + explicit PopularimeterFrame(const ByteVector &data, Header *h); + explicit PopularimeterFrame(const PopularimeterFrame&); + PopularimeterFrame &operator=(const PopularimeterFrame&); class PopularimeterFramePrivate; PopularimeterFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/privateframe.h b/3rdparty/taglib/mpeg/id3v2/frames/privateframe.h index 7dc1dc40b..216d14f59 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/privateframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/privateframe.h @@ -43,7 +43,7 @@ class TAGLIB_EXPORT PrivateFrame : public Frame { /*! * Construct an empty private frame. */ - PrivateFrame(); + explicit PrivateFrame(); /*! * Construct a private frame based on the data in \a data. @@ -96,10 +96,10 @@ class TAGLIB_EXPORT PrivateFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - PrivateFrame(const ByteVector &data, Header *h); + explicit PrivateFrame(const ByteVector &data, Header *h); - PrivateFrame(const PrivateFrame &); - PrivateFrame &operator=(const PrivateFrame &); + explicit PrivateFrame(const PrivateFrame&); + PrivateFrame &operator=(const PrivateFrame&); class PrivateFramePrivate; PrivateFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/3rdparty/taglib/mpeg/id3v2/frames/relativevolumeframe.h index b77929052..df3665f69 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/relativevolumeframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/relativevolumeframe.h @@ -95,12 +95,12 @@ class TAGLIB_EXPORT RelativeVolumeFrame : public Frame { /*! * Constructs a RelativeVolumeFrame. The relevant data should be set manually. */ - RelativeVolumeFrame(); + explicit RelativeVolumeFrame(); /*! * Constructs a RelativeVolumeFrame based on the contents of \a data. */ - RelativeVolumeFrame(const ByteVector &data); + explicit RelativeVolumeFrame(const ByteVector &data); /*! * Destroys the RelativeVolumeFrame instance. @@ -230,9 +230,9 @@ class TAGLIB_EXPORT RelativeVolumeFrame : public Frame { virtual ByteVector renderFields() const; private: - RelativeVolumeFrame(const ByteVector &data, Header *h); - RelativeVolumeFrame(const RelativeVolumeFrame &); - RelativeVolumeFrame &operator=(const RelativeVolumeFrame &); + explicit RelativeVolumeFrame(const ByteVector &data, Header *h); + explicit RelativeVolumeFrame(const RelativeVolumeFrame&); + RelativeVolumeFrame &operator=(const RelativeVolumeFrame&); class RelativeVolumeFramePrivate; RelativeVolumeFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h index 83214c59f..a9c06745c 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h @@ -212,9 +212,9 @@ class TAGLIB_EXPORT SynchronizedLyricsFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - SynchronizedLyricsFrame(const ByteVector &data, Header *h); - SynchronizedLyricsFrame(const SynchronizedLyricsFrame &); - SynchronizedLyricsFrame &operator=(const SynchronizedLyricsFrame &); + explicit SynchronizedLyricsFrame(const ByteVector &data, Header *h); + explicit SynchronizedLyricsFrame(const SynchronizedLyricsFrame&); + SynchronizedLyricsFrame &operator=(const SynchronizedLyricsFrame&); class SynchronizedLyricsFramePrivate; SynchronizedLyricsFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp b/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp index 6a3331b08..6d7d4253c 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp +++ b/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp @@ -56,16 +56,20 @@ namespace { // BIC: remove these ByteVector &strip(ByteVector &b) { + if (b.endsWith('\0')) b.resize(b.size() - 1); return b; + } ByteVectorList &strip(ByteVectorList &l) { + for (ByteVectorList::Iterator it = l.begin(); it != l.end(); ++it) { strip(*it); } return l; + } } // namespace diff --git a/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h index 0bd3c7ad7..eef2c6e70 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/tableofcontentsframe.h @@ -50,15 +50,13 @@ class TAGLIB_EXPORT TableOfContentsFrame : public ID3v2::Frame { * Creates a table of contents frame based on \a data. * \a tagHeader is required as the internal frames are parsed based on the tag version. */ - TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data); + explicit TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data); /*! * Creates a table of contents frame with the element ID \a elementID, * the child elements \a children and embedded frames, which become owned by this frame, in \a embeddedFrames. */ - TableOfContentsFrame(const ByteVector &elementID, - const ByteVectorList &children = ByteVectorList(), - const FrameList &embeddedFrames = FrameList()); + explicit TableOfContentsFrame(const ByteVector &elementID, const ByteVectorList &children = ByteVectorList(), const FrameList &embeddedFrames = FrameList()); /*! * Destroys the frame. @@ -229,9 +227,9 @@ class TAGLIB_EXPORT TableOfContentsFrame : public ID3v2::Frame { virtual ByteVector renderFields() const; private: - TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); - TableOfContentsFrame(const TableOfContentsFrame &); - TableOfContentsFrame &operator=(const TableOfContentsFrame &); + explicit TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); + explicit TableOfContentsFrame(const TableOfContentsFrame&); + TableOfContentsFrame &operator=(const TableOfContentsFrame&); class TableOfContentsFramePrivate; TableOfContentsFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h b/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h index 5206e6e0f..aaf6bf815 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/textidentificationframe.h @@ -114,7 +114,7 @@ class TAGLIB_EXPORT TextIdentificationFrame : public Frame { * * \note Please see the note in the class description regarding Latin1. */ - TextIdentificationFrame(const ByteVector &type, String::Type encoding); + explicit TextIdentificationFrame(const ByteVector &type, String::Type encoding); /*! * This is a dual purpose constructor. @@ -279,9 +279,9 @@ class TAGLIB_EXPORT UserTextIdentificationFrame : public TextIdentificationFrame static UserTextIdentificationFrame *find(Tag *tag, const String &description); private: - UserTextIdentificationFrame(const ByteVector &data, Header *h); - UserTextIdentificationFrame(const TextIdentificationFrame &); - UserTextIdentificationFrame &operator=(const UserTextIdentificationFrame &); + explicit UserTextIdentificationFrame(const ByteVector &data, Header *h); + explicit UserTextIdentificationFrame(const TextIdentificationFrame&); + UserTextIdentificationFrame &operator=(const UserTextIdentificationFrame&); void checkFields(); diff --git a/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h b/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h index de0be5fd5..538bc021f 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h @@ -46,12 +46,12 @@ class TAGLIB_EXPORT UniqueFileIdentifierFrame : public ID3v2::Frame { /*! * Creates a unique file identifier frame based on \a data. */ - UniqueFileIdentifierFrame(const ByteVector &data); + explicit UniqueFileIdentifierFrame(const ByteVector &data); /*! * Creates a unique file identifier frame with the owner \a owner and the identification \a id. */ - UniqueFileIdentifierFrame(const String &owner, const ByteVector &id); + explicit UniqueFileIdentifierFrame(const String &owner, const ByteVector &id); /*! * Destroys the frame. @@ -103,10 +103,10 @@ class TAGLIB_EXPORT UniqueFileIdentifierFrame : public ID3v2::Frame { virtual ByteVector renderFields() const; private: - UniqueFileIdentifierFrame(const UniqueFileIdentifierFrame &); - UniqueFileIdentifierFrame &operator=(const UniqueFileIdentifierFrame &); + explicit UniqueFileIdentifierFrame(const UniqueFileIdentifierFrame&); + UniqueFileIdentifierFrame &operator=(const UniqueFileIdentifierFrame&); - UniqueFileIdentifierFrame(const ByteVector &data, Header *h); + explicit UniqueFileIdentifierFrame(const ByteVector &data, Header *h); class UniqueFileIdentifierFramePrivate; UniqueFileIdentifierFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h b/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h index ff6b6b62c..a097f9b2e 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/unknownframe.h @@ -64,9 +64,9 @@ class TAGLIB_EXPORT UnknownFrame : public Frame { virtual ByteVector renderFields() const; private: - UnknownFrame(const ByteVector &data, Header *h); - UnknownFrame(const UnknownFrame &); - UnknownFrame &operator=(const UnknownFrame &); + explicit UnknownFrame(const ByteVector &data, Header *h); + explicit UnknownFrame(const UnknownFrame&); + UnknownFrame &operator=(const UnknownFrame&); class UnknownFramePrivate; UnknownFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h b/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h index ad01c4d55..105d3497d 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h @@ -161,9 +161,9 @@ class TAGLIB_EXPORT UnsynchronizedLyricsFrame : public Frame { /*! * The constructor used by the FrameFactory. */ - UnsynchronizedLyricsFrame(const ByteVector &data, Header *h); - UnsynchronizedLyricsFrame(const UnsynchronizedLyricsFrame &); - UnsynchronizedLyricsFrame &operator=(const UnsynchronizedLyricsFrame &); + explicit UnsynchronizedLyricsFrame(const ByteVector &data, Header *h); + explicit UnsynchronizedLyricsFrame(const UnsynchronizedLyricsFrame&); + UnsynchronizedLyricsFrame &operator=(const UnsynchronizedLyricsFrame&); class UnsynchronizedLyricsFramePrivate; UnsynchronizedLyricsFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h b/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h index aee3f7ca1..ac230ae3a 100644 --- a/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h +++ b/3rdparty/taglib/mpeg/id3v2/frames/urllinkframe.h @@ -173,8 +173,8 @@ class TAGLIB_EXPORT UserUrlLinkFrame : public UrlLinkFrame { UserUrlLinkFrame(const ByteVector &data, Header *h); private: - UserUrlLinkFrame(const UserUrlLinkFrame &); - UserUrlLinkFrame &operator=(const UserUrlLinkFrame &); + explicit UserUrlLinkFrame(const UserUrlLinkFrame&); + UserUrlLinkFrame &operator=(const UserUrlLinkFrame&); class UserUrlLinkFramePrivate; UserUrlLinkFramePrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2extendedheader.h b/3rdparty/taglib/mpeg/id3v2/id3v2extendedheader.h index 1528e3971..714ed7e85 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2extendedheader.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2extendedheader.h @@ -50,7 +50,7 @@ class TAGLIB_EXPORT ExtendedHeader { /*! * Constructs an empty ID3v2 extended header. */ - ExtendedHeader(); + explicit ExtendedHeader(); /*! * Destroys the extended header. @@ -78,8 +78,8 @@ class TAGLIB_EXPORT ExtendedHeader { void parse(const ByteVector &data); private: - ExtendedHeader(const ExtendedHeader &); - ExtendedHeader &operator=(const ExtendedHeader &); + explicit ExtendedHeader(const ExtendedHeader&); + ExtendedHeader &operator=(const ExtendedHeader&); class ExtendedHeaderPrivate; ExtendedHeaderPrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2footer.h b/3rdparty/taglib/mpeg/id3v2/id3v2footer.h index 5572655f6..b5eef30c7 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2footer.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2footer.h @@ -51,7 +51,7 @@ class TAGLIB_EXPORT Footer { /*! * Constructs an empty ID3v2 footer. */ - Footer(); + explicit Footer(); /*! * Destroys the footer. */ @@ -68,8 +68,8 @@ class TAGLIB_EXPORT Footer { ByteVector render(const Header *header) const; private: - Footer(const Footer &); - Footer &operator=(const Footer &); + explicit Footer(const Footer&); + Footer &operator=(const Footer&); class FooterPrivate; FooterPrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2frame.h b/3rdparty/taglib/mpeg/id3v2/id3v2frame.h index 125cb47cb..4b7094e54 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2frame.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2frame.h @@ -86,7 +86,7 @@ class TAGLIB_EXPORT Frame { * Please use the call below which accepts an ID3v2 version number. * In the next non-binary compatible release this will be made into a non-static member that checks the internal ID3v2 version. */ - static unsigned int headerSize(); // BIC: make non-static + unsigned int headerSize(); /*! * Returns the size of the frame header for the given ID3v2 version. @@ -271,8 +271,8 @@ class TAGLIB_EXPORT Frame { static void splitProperties(const PropertyMap &original, PropertyMap &singleFrameProperties, PropertyMap &tiplProperties, PropertyMap &tmclProperties); private: - Frame(const Frame &); - Frame &operator=(const Frame &); + explicit Frame(const Frame&); + Frame &operator=(const Frame&); class FramePrivate; friend class FramePrivate; @@ -455,8 +455,8 @@ class TAGLIB_EXPORT Frame::Header { ByteVector render() const; private: - Header(const Header &); - Header &operator=(const Header &); + explicit Header(const Header&); + Header &operator=(const Header&); class HeaderPrivate; HeaderPrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2framefactory.h b/3rdparty/taglib/mpeg/id3v2/id3v2framefactory.h index d653cc04e..b73435333 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2framefactory.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2framefactory.h @@ -63,15 +63,13 @@ class TAGLIB_EXPORT FrameFactory { /*! * Create a frame based on \a data. \a tagHeader should be a valid ID3v2::Header instance. */ - // BIC: make virtual - Frame *createFrame(const ByteVector &data, const Header *tagHeader) const; + virtual Frame *createFrame(const ByteVector &data, const Header *tagHeader) const; /*! * After a tag has been read, this tries to rebuild some of them information, * most notably the recording date, from frames that have been deprecated and can't be upgraded directly. */ - // BIC: Make virtual - void rebuildAggregateFrames(ID3v2::Tag *tag) const; + virtual void rebuildAggregateFrames(ID3v2::Tag *tag) const; /*! * Returns the default text encoding for text frames. @@ -97,7 +95,7 @@ class TAGLIB_EXPORT FrameFactory { /*! * Constructs a frame factory. Because this is a singleton this method is protected, but may be used for subclasses. */ - FrameFactory(); + explicit FrameFactory(); /*! * Destroys the frame factory. @@ -116,8 +114,8 @@ class TAGLIB_EXPORT FrameFactory { virtual bool updateFrame(Frame::Header *header) const; private: - FrameFactory(const FrameFactory &); - FrameFactory &operator=(const FrameFactory &); + explicit FrameFactory(const FrameFactory&); + FrameFactory &operator=(const FrameFactory&); static FrameFactory factory; diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2header.h b/3rdparty/taglib/mpeg/id3v2/id3v2header.h index 58e76e682..eebb9b9bd 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2header.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2header.h @@ -49,12 +49,12 @@ class TAGLIB_EXPORT Header { /*! * Constructs an empty ID3v2 header. */ - Header(); + explicit Header(); /*! * Constructs an ID3v2 header based on \a data. parse() is called immediately. */ - Header(const ByteVector &data); + explicit Header(const ByteVector &data); /*! * Destroys the header. @@ -151,8 +151,8 @@ class TAGLIB_EXPORT Header { void parse(const ByteVector &data); private: - Header(const Header &); - Header &operator=(const Header &); + explicit Header(const Header&); + Header &operator=(const Header&); class HeaderPrivate; HeaderPrivate *d; diff --git a/3rdparty/taglib/mpeg/id3v2/id3v2tag.h b/3rdparty/taglib/mpeg/id3v2/id3v2tag.h index ff710c871..4b34b0a4d 100644 --- a/3rdparty/taglib/mpeg/id3v2/id3v2tag.h +++ b/3rdparty/taglib/mpeg/id3v2/id3v2tag.h @@ -68,7 +68,7 @@ typedef Map FrameListMap; */ class TAGLIB_EXPORT Latin1StringHandler { public: - Latin1StringHandler(); + explicit Latin1StringHandler(); virtual ~Latin1StringHandler(); /*! @@ -121,7 +121,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { * * \note You must create at least one frame for this tag to be valid. */ - Tag(); + explicit Tag(); /*! * Constructs an ID3v2 tag read from \a file starting at \a tagOffset. @@ -133,8 +133,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { * * \see FrameFactory */ - Tag(File *file, long tagOffset, - const FrameFactory *factory = FrameFactory::instance()); + explicit Tag(File *file, long tagOffset, const FrameFactory *factory = FrameFactory::instance()); /*! * Destroys this Tag instance. @@ -349,8 +348,8 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { void downgradeFrames(FrameList *existingFrames, FrameList *newFrames) const; private: - Tag(const Tag &); - Tag &operator=(const Tag &); + explicit Tag(const Tag&); + Tag &operator=(const Tag&); class TagPrivate; TagPrivate *d; diff --git a/3rdparty/taglib/mpeg/mpegfile.h b/3rdparty/taglib/mpeg/mpegfile.h index 641ca997b..9398018d8 100644 --- a/3rdparty/taglib/mpeg/mpegfile.h +++ b/3rdparty/taglib/mpeg/mpegfile.h @@ -88,7 +88,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * \note In the current implementation, \a propertiesStyle is ignored. */ // BIC: merge with the above constructor - File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an MPEG file from \a stream. @@ -100,9 +100,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, ID3v2::FrameFactory *frameFactory, - bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -314,8 +312,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); long findID3v2(); diff --git a/3rdparty/taglib/mpeg/mpegheader.h b/3rdparty/taglib/mpeg/mpegheader.h index af1170a8a..f5587db1a 100644 --- a/3rdparty/taglib/mpeg/mpegheader.h +++ b/3rdparty/taglib/mpeg/mpegheader.h @@ -54,12 +54,12 @@ class TAGLIB_EXPORT Header { * check if the frame length is parsed and calculated correctly. * So it's suitable for seeking for the first valid frame. */ - Header(File *file, long offset, bool checkLength = true); + explicit Header(File *file, long offset, bool checkLength = true); /*! * Does a shallow copy of \a h. */ - Header(const Header &h); + explicit Header(const Header &h); /*! * Destroys this Header instance. diff --git a/3rdparty/taglib/mpeg/mpegproperties.h b/3rdparty/taglib/mpeg/mpegproperties.h index 0d8c0f0c1..a087316bf 100644 --- a/3rdparty/taglib/mpeg/mpegproperties.h +++ b/3rdparty/taglib/mpeg/mpegproperties.h @@ -49,7 +49,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of MPEG::AudioProperties with the data read from the MPEG::File \a file. */ - AudioProperties(File *file, ReadStyle style = Average); + explicit AudioProperties(File *file, ReadStyle style = Average); /*! * Destroys this MPEG AudioProperties instance. @@ -61,16 +61,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -123,8 +121,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro bool isOriginal() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(File *file); diff --git a/3rdparty/taglib/mpeg/xingheader.h b/3rdparty/taglib/mpeg/xingheader.h index b61bff9c9..686ea7333 100644 --- a/3rdparty/taglib/mpeg/xingheader.h +++ b/3rdparty/taglib/mpeg/xingheader.h @@ -75,7 +75,7 @@ class TAGLIB_EXPORT XingHeader { /*! * Parses an Xing/VBRI header based on \a data which contains the entire first MPEG frame. */ - XingHeader(const ByteVector &data); + explicit XingHeader(const ByteVector &data); /*! * Destroy this XingHeader instance. @@ -103,8 +103,8 @@ class TAGLIB_EXPORT XingHeader { HeaderType type() const; private: - XingHeader(const XingHeader &); - XingHeader &operator=(const XingHeader &); + explicit XingHeader(const XingHeader&); + XingHeader &operator=(const XingHeader&); void parse(const ByteVector &data); diff --git a/3rdparty/taglib/ogg/flac/oggflacfile.h b/3rdparty/taglib/ogg/flac/oggflacfile.h index 028b0de79..21c4b6292 100644 --- a/3rdparty/taglib/ogg/flac/oggflacfile.h +++ b/3rdparty/taglib/ogg/flac/oggflacfile.h @@ -69,7 +69,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an Ogg/FLAC file from \a stream. @@ -79,7 +79,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -145,8 +145,8 @@ class TAGLIB_EXPORT File : public Ogg::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties, AudioProperties::ReadStyle propertiesStyle); void scan(); diff --git a/3rdparty/taglib/ogg/oggfile.h b/3rdparty/taglib/ogg/oggfile.h index b0e20c51b..c3529b8fe 100644 --- a/3rdparty/taglib/ogg/oggfile.h +++ b/3rdparty/taglib/ogg/oggfile.h @@ -81,7 +81,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note This constructor is protected since Ogg::File shouldn't be instantiated directly but rather should be used through the codec specific subclasses. */ - File(FileName file); + explicit File(FileName file); /*! * Constructs an Ogg file from \a stream. @@ -93,7 +93,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { File(IOStream *stream); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); /*! diff --git a/3rdparty/taglib/ogg/oggpage.cpp b/3rdparty/taglib/ogg/oggpage.cpp index ed5279a14..4a24a6060 100644 --- a/3rdparty/taglib/ogg/oggpage.cpp +++ b/3rdparty/taglib/ogg/oggpage.cpp @@ -34,6 +34,62 @@ using namespace Strawberry_TagLib::TagLib; +namespace { +ByteVector checksum(const ByteVector &v) { + const unsigned int crcTable[256] = { + 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, + 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, + 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, + 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, + 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, + 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, + 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, + 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, + 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, + 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, + 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, + 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, + 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, + 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, + 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, + 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, + 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, + 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, + 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050, + 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, + 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, + 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, + 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, + 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, + 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, + 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, + 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9, + 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, + 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, + 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, + 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, + 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, + 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, + 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, + 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, + 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, + 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, + 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, + 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, + 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, + 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, + 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, + 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 + }; + + unsigned int sum = 0; + for (ByteVector::ConstIterator it = v.begin(); it != v.end(); ++it) + sum = (sum << 8) ^ crcTable[((sum >> 24) & 0xff) ^ static_cast(*it)]; + + return ByteVector::fromUInt(sum); +} +} // namespace + class Ogg::Page::PagePrivate { public: PagePrivate(File *f = nullptr, long pageOffset = -1) : file(f), fileOffset(pageOffset), header(f, pageOffset), firstPacketIndex(-1) {} @@ -172,8 +228,8 @@ ByteVector Ogg::Page::render() const { // the entire page with the 4 bytes reserved for the checksum zeroed and then // inserted in bytes 22-25 of the page header. - const ByteVector checksum = ByteVector::fromUInt(data.checksum(), false); - std::copy(checksum.begin(), checksum.end(), data.begin() + 22); + const ByteVector sum = checksum(data); + std::copy(sum.begin(), sum.end(), data.begin() + 22); return data; diff --git a/3rdparty/taglib/ogg/oggpage.h b/3rdparty/taglib/ogg/oggpage.h index 22cd2170d..f45492e73 100644 --- a/3rdparty/taglib/ogg/oggpage.h +++ b/3rdparty/taglib/ogg/oggpage.h @@ -54,7 +54,7 @@ class TAGLIB_EXPORT Page { /*! * Read an Ogg page from the \a file at the position \a pageOffset. */ - Page(File *file, long pageOffset); + explicit Page(File *file, long pageOffset); virtual ~Page(); @@ -193,7 +193,7 @@ class TAGLIB_EXPORT Page { bool containsLastPacket = false); private: - Page(const Page &); + explicit Page(const Page &); Page &operator=(const Page &); class PagePrivate; diff --git a/3rdparty/taglib/ogg/oggpageheader.h b/3rdparty/taglib/ogg/oggpageheader.h index a3f3d2698..5d5cfedf0 100644 --- a/3rdparty/taglib/ogg/oggpageheader.h +++ b/3rdparty/taglib/ogg/oggpageheader.h @@ -48,7 +48,7 @@ class TAGLIB_EXPORT PageHeader { * Reads a PageHeader from \a file starting at \a pageOffset. * The defaults create a page with no (and as such, invalid) data that must be set later. */ - PageHeader(File *file = 0, long pageOffset = -1); + explicit PageHeader(File *file = 0, long pageOffset = -1); /*! * Deletes this instance of the PageHeader. @@ -200,8 +200,8 @@ class TAGLIB_EXPORT PageHeader { ByteVector render() const; private: - PageHeader(const PageHeader &); - PageHeader &operator=(const PageHeader &); + explicit PageHeader(const PageHeader&); + PageHeader &operator=(const PageHeader&); void read(Ogg::File *file, long pageOffset); ByteVector lacingValues() const; diff --git a/3rdparty/taglib/ogg/opus/opusfile.h b/3rdparty/taglib/ogg/opus/opusfile.h index a5d3c7601..db077265d 100644 --- a/3rdparty/taglib/ogg/opus/opusfile.h +++ b/3rdparty/taglib/ogg/opus/opusfile.h @@ -61,7 +61,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an Opus file from \a stream. @@ -71,7 +71,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -117,8 +117,8 @@ class TAGLIB_EXPORT File : public Ogg::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/ogg/opus/opusproperties.h b/3rdparty/taglib/ogg/opus/opusproperties.h index fad911605..20b201e37 100644 --- a/3rdparty/taglib/ogg/opus/opusproperties.h +++ b/3rdparty/taglib/ogg/opus/opusproperties.h @@ -53,7 +53,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * Create an instance of Opus::AudioProperties with the data read from the * Opus::File \a file. */ - AudioProperties(File *file, ReadStyle style = Average); + explicit AudioProperties(File *file, ReadStyle style = Average); /*! * Destroys this Opus::AudioProperties instance. @@ -65,16 +65,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -105,8 +103,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int opusVersion() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(File *file); diff --git a/3rdparty/taglib/ogg/speex/speexfile.h b/3rdparty/taglib/ogg/speex/speexfile.h index a7251e2a9..d3c633ec8 100644 --- a/3rdparty/taglib/ogg/speex/speexfile.h +++ b/3rdparty/taglib/ogg/speex/speexfile.h @@ -62,7 +62,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a Speex file from \a stream. @@ -72,7 +72,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -117,8 +117,8 @@ class TAGLIB_EXPORT File : public Ogg::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/ogg/speex/speexproperties.h b/3rdparty/taglib/ogg/speex/speexproperties.h index e64967f02..36996a541 100644 --- a/3rdparty/taglib/ogg/speex/speexproperties.h +++ b/3rdparty/taglib/ogg/speex/speexproperties.h @@ -47,7 +47,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of Speex::AudioProperties with the data read from the Speex::File \a file. */ - AudioProperties(File *file, ReadStyle style = Average); + explicit AudioProperties(File *file, ReadStyle style = Average); /*! * Destroys this Speex::AudioProperties instance. @@ -59,16 +59,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -96,8 +94,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int speexVersion() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(File *file); diff --git a/3rdparty/taglib/ogg/vorbis/vorbisfile.h b/3rdparty/taglib/ogg/vorbis/vorbisfile.h index 3eea68c37..6961c093b 100644 --- a/3rdparty/taglib/ogg/vorbis/vorbisfile.h +++ b/3rdparty/taglib/ogg/vorbis/vorbisfile.h @@ -64,7 +64,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, Strawberry_TagLib::TagLib::AudioProperties::ReadStyle propertiesStyle = Strawberry_TagLib::TagLib::AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, Strawberry_TagLib::TagLib::AudioProperties::ReadStyle propertiesStyle = Strawberry_TagLib::TagLib::AudioProperties::Average); /*! * Constructs a Vorbis file from \a stream. @@ -74,7 +74,7 @@ class TAGLIB_EXPORT File : public Ogg::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, Strawberry_TagLib::TagLib::AudioProperties::ReadStyle propertiesStyle = Strawberry_TagLib::TagLib::AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, Strawberry_TagLib::TagLib::AudioProperties::ReadStyle propertiesStyle = Strawberry_TagLib::TagLib::AudioProperties::Average); /*! * Destroys this instance of the File. @@ -120,8 +120,8 @@ class TAGLIB_EXPORT File : public Ogg::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/ogg/vorbis/vorbisproperties.h b/3rdparty/taglib/ogg/vorbis/vorbisproperties.h index 1efebdbd5..1dcc05fe0 100644 --- a/3rdparty/taglib/ogg/vorbis/vorbisproperties.h +++ b/3rdparty/taglib/ogg/vorbis/vorbisproperties.h @@ -57,7 +57,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of Vorbis::AudioProperties with the data read from the Vorbis::File \a file. */ - AudioProperties(File *file, ReadStyle style = Average); + explicit AudioProperties(File *file, ReadStyle style = Average); /*! * Destroys this VorbisProperties instance. @@ -69,16 +69,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -116,7 +114,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int bitrateMinimum() const; private: - AudioProperties(const AudioProperties &); + explicit AudioProperties(const AudioProperties &); AudioProperties &operator=(const AudioProperties &); void read(File *file); diff --git a/3rdparty/taglib/ogg/xiphcomment.cpp b/3rdparty/taglib/ogg/xiphcomment.cpp index 45d867d2c..18a085640 100644 --- a/3rdparty/taglib/ogg/xiphcomment.cpp +++ b/3rdparty/taglib/ogg/xiphcomment.cpp @@ -336,10 +336,6 @@ List Ogg::XiphComment::pictureList() { return d->pictureList; } -ByteVector Ogg::XiphComment::render() const { - return render(true); -} - ByteVector Ogg::XiphComment::render(bool addFramingBit) const { ByteVector data; diff --git a/3rdparty/taglib/ogg/xiphcomment.h b/3rdparty/taglib/ogg/xiphcomment.h index ca2e5b1b1..2140fb2f8 100644 --- a/3rdparty/taglib/ogg/xiphcomment.h +++ b/3rdparty/taglib/ogg/xiphcomment.h @@ -66,12 +66,12 @@ class TAGLIB_EXPORT XiphComment : public Strawberry_TagLib::TagLib::Tag { /*! * Constructs an empty Vorbis comment. */ - XiphComment(); + explicit XiphComment(); /*! * Constructs a Vorbis comment from \a data. */ - XiphComment(const ByteVector &data); + explicit XiphComment(const ByteVector &data); /*! * Destroys this instance of the XiphComment. @@ -199,11 +199,6 @@ class TAGLIB_EXPORT XiphComment : public Strawberry_TagLib::TagLib::Tag { */ bool contains(const String &key) const; - /*! - * Renders the comment to a ByteVector suitable for inserting into a file. - */ - ByteVector render() const; // BIC: remove and merge with below - /*! * Renders the comment to a ByteVector suitable for inserting into a file. * @@ -211,7 +206,7 @@ class TAGLIB_EXPORT XiphComment : public Strawberry_TagLib::TagLib::Tag { * be appended. However some formats (notably FLAC) do not work with this * in place. */ - ByteVector render(bool addFramingBit) const; + ByteVector render(bool addFramingBit = true) const; /*! @@ -243,8 +238,8 @@ class TAGLIB_EXPORT XiphComment : public Strawberry_TagLib::TagLib::Tag { void parse(const ByteVector &data); private: - XiphComment(const XiphComment &); - XiphComment &operator=(const XiphComment &); + explicit XiphComment(const XiphComment&); + XiphComment &operator=(const XiphComment&); class XiphCommentPrivate; XiphCommentPrivate *d; diff --git a/3rdparty/taglib/riff/aiff/aifffile.h b/3rdparty/taglib/riff/aiff/aifffile.h index ac0fb213b..91c003801 100644 --- a/3rdparty/taglib/riff/aiff/aifffile.h +++ b/3rdparty/taglib/riff/aiff/aifffile.h @@ -62,8 +62,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::RIFF::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an AIFF file from \a stream. @@ -74,8 +73,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::RIFF::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -138,7 +136,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::RIFF::File { static bool isSupported(IOStream *stream); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); void read(bool readProperties); diff --git a/3rdparty/taglib/riff/aiff/aiffproperties.h b/3rdparty/taglib/riff/aiff/aiffproperties.h index 79393cce2..82aedfa95 100644 --- a/3rdparty/taglib/riff/aiff/aiffproperties.h +++ b/3rdparty/taglib/riff/aiff/aiffproperties.h @@ -47,7 +47,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of AIFF::AudioProperties with the data read from the AIFF::File \a file. */ - AudioProperties(File *file, ReadStyle style); + explicit AudioProperties(File *file, ReadStyle style); /*! * Destroys this AIFF::AudioProperties instance. @@ -59,16 +59,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -119,8 +117,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro String compressionName() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(File *file); diff --git a/3rdparty/taglib/riff/rifffile.h b/3rdparty/taglib/riff/rifffile.h index cf388b451..bddb3e858 100644 --- a/3rdparty/taglib/riff/rifffile.h +++ b/3rdparty/taglib/riff/rifffile.h @@ -52,11 +52,13 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { virtual ~File(); protected: - enum Endianness { BigEndian, - LittleEndian }; + enum Endianness { + BigEndian, + LittleEndian + }; - File(FileName file, Endianness endianness); - File(IOStream *stream, Endianness endianness); + explicit File(FileName file, Endianness endianness); + explicit File(IOStream *stream, Endianness endianness); /*! * \return The size of the main RIFF chunk. @@ -138,12 +140,11 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { void removeChunk(const ByteVector &name); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(); - void writeChunk(const ByteVector &name, const ByteVector &data, - unsigned long offset, unsigned long replace = 0); + void writeChunk(const ByteVector &name, const ByteVector &data, unsigned long offset, unsigned long replace = 0); /*! * Update the global RIFF size based on the current internal structure. diff --git a/3rdparty/taglib/riff/wav/infotag.h b/3rdparty/taglib/riff/wav/infotag.h index 6813d8997..124cf073a 100644 --- a/3rdparty/taglib/riff/wav/infotag.h +++ b/3rdparty/taglib/riff/wav/infotag.h @@ -58,7 +58,7 @@ typedef Map FieldListMap; class TAGLIB_EXPORT StringHandler { public: - StringHandler(); + explicit StringHandler(); ~StringHandler(); /*! @@ -89,12 +89,12 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { /*! * Constructs an empty INFO tag. */ - Tag(); + explicit Tag(); /*! * Constructs an INFO tag read from \a data which is contents of "LIST" chunk. */ - Tag(const ByteVector &data); + explicit Tag(const ByteVector &data); virtual ~Tag(); @@ -174,10 +174,9 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag { */ void parse(const ByteVector &data); - private: - Tag(const Tag &); - Tag &operator=(const Tag &); + explicit Tag(const Tag&); + Tag &operator=(const Tag&); class TagPrivate; TagPrivate *d; diff --git a/3rdparty/taglib/riff/wav/wavfile.h b/3rdparty/taglib/riff/wav/wavfile.h index 6f0b2d290..c3d01b4b2 100644 --- a/3rdparty/taglib/riff/wav/wavfile.h +++ b/3rdparty/taglib/riff/wav/wavfile.h @@ -75,7 +75,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::RIFF::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a WAV file from \a stream. @@ -85,7 +85,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::RIFF::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -181,8 +181,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::RIFF::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); void removeTagChunks(TagTypes tags); diff --git a/3rdparty/taglib/riff/wav/wavproperties.h b/3rdparty/taglib/riff/wav/wavproperties.h index 0de2e4406..cb010978a 100644 --- a/3rdparty/taglib/riff/wav/wavproperties.h +++ b/3rdparty/taglib/riff/wav/wavproperties.h @@ -51,7 +51,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of WAV::AudioProperties with the data read from the WAV::File \a file. */ - AudioProperties(File *file, ReadStyle style); + explicit AudioProperties(File *file, ReadStyle style); /*! * Destroys this WAV::AudioProperties instance. @@ -64,16 +64,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -109,8 +107,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int format() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(File *file); diff --git a/3rdparty/taglib/s3m/s3mfile.h b/3rdparty/taglib/s3m/s3mfile.h index ad2e53daf..96de8fe8d 100644 --- a/3rdparty/taglib/s3m/s3mfile.h +++ b/3rdparty/taglib/s3m/s3mfile.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { * \note In the current implementation, both \a readProperties and * \a propertiesStyle are ignored. The audio properties are always read. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a ScreamTracker III file from \a stream. @@ -55,7 +55,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { * * \note TagLib will *not* take ownership of the stream, the caller is responsible for deleting it after the File object. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -91,7 +91,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { bool save(); private: - File(const File &); + explicit File(const File &); File &operator=(const File &); void read(bool readProperties); diff --git a/3rdparty/taglib/s3m/s3mproperties.h b/3rdparty/taglib/s3m/s3mproperties.h index aff47baf6..0a0e004d5 100644 --- a/3rdparty/taglib/s3m/s3mproperties.h +++ b/3rdparty/taglib/s3m/s3mproperties.h @@ -48,7 +48,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro CustomData = 128 }; - AudioProperties(AudioProperties::ReadStyle propertiesStyle); + explicit AudioProperties(AudioProperties::ReadStyle propertiesStyle); virtual ~AudioProperties(); int lengthInSeconds() const; @@ -84,8 +84,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro void setBpmSpeed(unsigned char bpmSpeed); private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); class AudioPropertiesPrivate; AudioPropertiesPrivate *d; diff --git a/3rdparty/taglib/tag.h b/3rdparty/taglib/tag.h index adc6f476f..76e66d586 100644 --- a/3rdparty/taglib/tag.h +++ b/3rdparty/taglib/tag.h @@ -53,22 +53,20 @@ class TAGLIB_EXPORT Tag { * Exports the tags of the file as dictionary mapping (human readable) tag names (Strings) to StringLists of tag values. * The default implementation in this class considers only the usual built-in tags (artist, album, ...) and only one value per key. */ - PropertyMap properties() const; + virtual PropertyMap properties() const; /*! * Removes unsupported properties, or a subset of them, from the tag. * The parameter \a properties must contain only entries from properties().unsupportedData(). - * BIC: Will become virtual in future releases. Currently the non-virtual - * standard implementation of TagLib::Tag does nothing, since there are no unsupported elements. */ - void removeUnsupportedProperties(const StringList &properties); + virtual void removeUnsupportedProperties(const StringList &properties); /*! * Sets the tags of this File to those specified in \a properties. * This default implementation sets only the tags for which setter methods exist in this class * (artist, album, ...), and only one value per key; the rest will be contained in the returned PropertyMap. */ - PropertyMap setProperties(const PropertyMap &origProps); + virtual PropertyMap setProperties(const PropertyMap &origProps); /*! * Returns the track name; if no track name is present in the tag String::null will be returned. @@ -166,11 +164,11 @@ class TAGLIB_EXPORT Tag { /*! * Construct a Tag. This is protected since tags should only be instantiated through subclasses. */ - Tag(); + explicit Tag(); private: - Tag(const Tag &); - Tag &operator=(const Tag &); + explicit Tag(const Tag&); + Tag &operator=(const Tag&); class TagPrivate; TagPrivate *d; diff --git a/3rdparty/taglib/tagunion.h b/3rdparty/taglib/tagunion.h index f360651d0..799dea2cb 100644 --- a/3rdparty/taglib/tagunion.h +++ b/3rdparty/taglib/tagunion.h @@ -39,14 +39,16 @@ namespace TagLib { class TagUnion : public Tag { public: - enum AccessType { Read, - Write }; + enum AccessType { + Read, + Write + }; /*! * Creates a TagLib::Tag that is the union of \a first, \a second, and \a third. * The TagUnion takes ownership of these tags and will handle their deletion. */ - TagUnion(Tag *first = nullptr, Tag *second = nullptr, Tag *third = nullptr); + explicit TagUnion(Tag *first = nullptr, Tag *second = nullptr, Tag *third = nullptr); virtual ~TagUnion(); @@ -86,8 +88,8 @@ class TagUnion : public Tag { } private: - TagUnion(const Tag &); - TagUnion &operator=(const Tag &); + explicit TagUnion(const Tag&); + TagUnion &operator=(const Tag&); class TagUnionPrivate; TagUnionPrivate *d; diff --git a/3rdparty/taglib/toolkit/tbytevector.cpp b/3rdparty/taglib/toolkit/tbytevector.cpp index 7af47ba49..7879714d9 100644 --- a/3rdparty/taglib/toolkit/tbytevector.cpp +++ b/3rdparty/taglib/toolkit/tbytevector.cpp @@ -283,8 +283,6 @@ class ByteVector::ByteVectorPrivate { // static members //////////////////////////////////////////////////////////////////////////////// -ByteVector ByteVector::null; - ByteVector ByteVector::fromCString(const char *s, unsigned int length) { if (length == 0xffffffff) return ByteVector(s, static_cast(::strlen(s))); @@ -618,67 +616,10 @@ ByteVector::ConstReverseIterator ByteVector::rend() const { } -bool ByteVector::isNull() const { - return (d == null.d); -} - bool ByteVector::isEmpty() const { return (d->length == 0); } -unsigned int ByteVector::checksum() const { - static const unsigned int crcTable[256] = { - 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, - 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, - 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, - 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, - 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, - 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, - 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, - 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, - 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, - 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, - 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, - 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, - 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, - 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, - 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, - 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, - 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, - 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, - 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050, - 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, - 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, - 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, - 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, - 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, - 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, - 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, - 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9, - 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, - 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, - 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, - 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, - 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, - 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, - 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, - 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, - 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, - 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, - 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, - 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, - 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, - 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, - 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, - 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 - }; - - unsigned int sum = 0; - for (ByteVector::ConstIterator it = begin(); it != end(); ++it) - sum = (sum << 8) ^ crcTable[((sum >> 24) & 0xff) ^ static_cast(*it)]; - return sum; -} - unsigned int ByteVector::toUInt(bool mostSignificantByteFirst) const { return toNumber(*this, 0, mostSignificantByteFirst); } diff --git a/3rdparty/taglib/toolkit/tbytevector.h b/3rdparty/taglib/toolkit/tbytevector.h index a9e2d68de..a540df9a6 100644 --- a/3rdparty/taglib/toolkit/tbytevector.h +++ b/3rdparty/taglib/toolkit/tbytevector.h @@ -54,12 +54,12 @@ class TAGLIB_EXPORT ByteVector { /*! * Constructs an empty byte vector. */ - ByteVector(); + explicit ByteVector(); /*! * Construct a vector of size \a size with all values set to \a value by default. */ - ByteVector(unsigned int size, char value = 0); + explicit ByteVector(unsigned int size, char value = 0); /*! * Constructs a byte vector that is a copy of \a v. @@ -69,7 +69,7 @@ class TAGLIB_EXPORT ByteVector { /*! * Constructs a byte vector that is a copy of \a v. */ - ByteVector(const ByteVector &v, unsigned int offset, unsigned int length); + explicit ByteVector(const ByteVector &v, unsigned int offset, unsigned int length); /*! * Constructs a byte vector that contains \a c. @@ -79,7 +79,7 @@ class TAGLIB_EXPORT ByteVector { /*! * Constructs a byte vector that copies \a data for up to \a length bytes. */ - ByteVector(const char *data, unsigned int length); + explicit ByteVector(const char *data, unsigned int length); /*! * Constructs a byte vector that copies \a data up to the first null byte. @@ -158,8 +158,7 @@ class TAGLIB_EXPORT ByteVector { * Optionally, if you only want to search for part of the pattern you can specify an offset within the pattern to start from. * Also, you can specify to only check for the first \a patternLength bytes of \a pattern with the \a patternLength argument. */ - bool containsAt(const ByteVector &pattern, unsigned int offset, - unsigned int patternOffset = 0, unsigned int patternLength = 0xffffffff) const; + bool containsAt(const ByteVector &pattern, unsigned int offset, unsigned int patternOffset = 0, unsigned int patternLength = 0xffffffff) const; /*! * Returns true if the vector starts with \a pattern. @@ -258,18 +257,6 @@ class TAGLIB_EXPORT ByteVector { */ ConstReverseIterator rend() const; - /*! - * Returns true if the vector is null. - * - * \note A vector may be empty without being null. So do not use this method to check if the vector is empty. - * - * \see isEmpty() - * - * \deprecated - */ - // BIC: remove - bool isNull() const; - /*! * Returns true if the ByteVector is empty. * @@ -278,14 +265,6 @@ class TAGLIB_EXPORT ByteVector { */ bool isEmpty() const; - /*! - * Returns a CRC checksum of the byte vector's data. - * - * \note This uses an uncommon variant of CRC32 specializes in Ogg. - */ - // BIC: Remove or make generic. - unsigned int checksum() const; - /*! * Converts the first 4 bytes of the vector to an unsigned integer. * @@ -546,17 +525,6 @@ class TAGLIB_EXPORT ByteVector { */ void swap(ByteVector &v); - /*! - * A static, empty ByteVector which is convenient and fast (since returning an empty or "null" value does not require instantiating a new ByteVector). - * - * \warning Do not modify this variable. It will mess up the internal state - * of TagLib. - * - * \deprecated - */ - // BIC: remove - static ByteVector null; - /*! * Returns a hex-encoded copy of the byte vector. */ diff --git a/3rdparty/taglib/toolkit/tbytevectorlist.h b/3rdparty/taglib/toolkit/tbytevectorlist.h index 456c80717..d30179457 100644 --- a/3rdparty/taglib/toolkit/tbytevectorlist.h +++ b/3rdparty/taglib/toolkit/tbytevectorlist.h @@ -44,7 +44,7 @@ class TAGLIB_EXPORT ByteVectorList : public List { /*! * Construct an empty ByteVectorList. */ - ByteVectorList(); + explicit ByteVectorList(); /*! * Destroys this ByteVectorList instance. diff --git a/3rdparty/taglib/toolkit/tbytevectorstream.h b/3rdparty/taglib/toolkit/tbytevectorstream.h index dc2e4fece..5da5a7d2c 100644 --- a/3rdparty/taglib/toolkit/tbytevectorstream.h +++ b/3rdparty/taglib/toolkit/tbytevectorstream.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT ByteVectorStream : public IOStream { /*! * Construct a File object and opens the \a file. \a file should be a be a C-string in the local file system encoding. */ - ByteVectorStream(const ByteVector &data); + explicit ByteVectorStream(const ByteVector &data); /*! * Destroys this ByteVectorStream instance. diff --git a/3rdparty/taglib/toolkit/tdebuglistener.h b/3rdparty/taglib/toolkit/tdebuglistener.h index 362293c3f..7bb94aac0 100644 --- a/3rdparty/taglib/toolkit/tdebuglistener.h +++ b/3rdparty/taglib/toolkit/tdebuglistener.h @@ -42,7 +42,7 @@ namespace TagLib { */ class TAGLIB_EXPORT DebugListener { public: - DebugListener(); + explicit DebugListener(); virtual ~DebugListener(); /*! @@ -53,8 +53,8 @@ class TAGLIB_EXPORT DebugListener { private: // Noncopyable - DebugListener(const DebugListener &); - DebugListener &operator=(const DebugListener &); + explicit DebugListener(const DebugListener&); + DebugListener &operator=(const DebugListener&); }; /*! diff --git a/3rdparty/taglib/toolkit/tfile.h b/3rdparty/taglib/toolkit/tfile.h index c97123552..dc8972b00 100644 --- a/3rdparty/taglib/toolkit/tfile.h +++ b/3rdparty/taglib/toolkit/tfile.h @@ -104,16 +104,14 @@ class TAGLIB_EXPORT File { * to remove (a subset of) them. * For files that contain more than one tag (e.g. an MP3 with both an ID3v1 and an ID3v2 * tag) only the most "modern" one will be exported (ID3v2 in this case). - * BIC: Will be made virtual in future releases. */ - PropertyMap properties() const; + virtual PropertyMap properties() const; /*! * Removes unsupported properties, or a subset of them, from the file's metadata. * The parameter \a properties must contain only entries from properties().unsupportedData(). - * BIC: Will be mad virtual in future releases. */ - void removeUnsupportedProperties(const StringList &properties); + virtual void removeUnsupportedProperties(const StringList &properties); /*! * Sets the tags of this File to those specified in \a properties. Calls the @@ -127,9 +125,8 @@ class TAGLIB_EXPORT File { * (ID3v2 for MP3 files). Older formats will be updated as well, if they exist, but won't * be taken into account for the return value of this function. * See the documentation of the subclass implementations for detailed descriptions. - * BIC: will become pure virtual in the future */ - PropertyMap setProperties(const PropertyMap &properties); + virtual PropertyMap setProperties(const PropertyMap &properties); /*! * Returns a pointer to this file's audio properties. @@ -251,7 +248,7 @@ class TAGLIB_EXPORT File { * * \note Constructor is protected since this class should only be instantiated through subclasses. */ - File(FileName file); + explicit File(FileName file); /*! * Construct a File object and use the \a stream instance. @@ -260,7 +257,7 @@ class TAGLIB_EXPORT File { * * \note Constructor is protected since this class should only be instantiated through subclasses. */ - File(IOStream *stream); + explicit File(IOStream *stream); /*! * Marks the file as valid or invalid. @@ -280,8 +277,8 @@ class TAGLIB_EXPORT File { static unsigned int bufferSize(); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); class FilePrivate; FilePrivate *d; diff --git a/3rdparty/taglib/toolkit/tfilestream.h b/3rdparty/taglib/toolkit/tfilestream.h index a43d6716f..57058b391 100644 --- a/3rdparty/taglib/toolkit/tfilestream.h +++ b/3rdparty/taglib/toolkit/tfilestream.h @@ -51,12 +51,12 @@ class TAGLIB_EXPORT FileStream : public IOStream { * Construct a File object and opens the \a file. * \a file should be a be a C-string in the local file system encoding. */ - FileStream(FileName file, bool openReadOnly = false); + explicit FileStream(FileName file, bool openReadOnly = false); /*! * Construct a File object and opens the \a file using file descriptor. */ - FileStream(int fileDescriptor, bool openReadOnly = false); + explicit FileStream(int fileDescriptor, bool openReadOnly = false); /*! * Destroys this FileStream instance. diff --git a/3rdparty/taglib/toolkit/tiostream.h b/3rdparty/taglib/toolkit/tiostream.h index 1027bed24..0bc71780a 100644 --- a/3rdparty/taglib/toolkit/tiostream.h +++ b/3rdparty/taglib/toolkit/tiostream.h @@ -36,10 +36,10 @@ namespace TagLib { #ifdef _WIN32 class TAGLIB_EXPORT FileName { public: - FileName(const wchar_t *name); - FileName(const char *name); + explicit FileName(const wchar_t *name); + explicit FileName(const char *name); - FileName(const FileName &name); + explicit FileName(const FileName &name); operator const wchar_t *() const; operator const char *() const; @@ -73,7 +73,7 @@ class TAGLIB_EXPORT IOStream { End }; - IOStream(); + explicit IOStream(); /*! * Destroys this IOStream instance. @@ -153,8 +153,8 @@ class TAGLIB_EXPORT IOStream { virtual void truncate(long length) = 0; private: - IOStream(const IOStream &); - IOStream &operator=(const IOStream &); + explicit IOStream(const IOStream&); + IOStream &operator=(const IOStream&); }; } // namespace TagLib diff --git a/3rdparty/taglib/toolkit/tlist.h b/3rdparty/taglib/toolkit/tlist.h index 5a4395350..0238fcab0 100644 --- a/3rdparty/taglib/toolkit/tlist.h +++ b/3rdparty/taglib/toolkit/tlist.h @@ -61,7 +61,7 @@ template class List { /*! * Constructs an empty list. */ - List(); + explicit List(); /*! * Make a shallow, implicitly shared, copy of \a l. diff --git a/3rdparty/taglib/toolkit/tlist.tcc b/3rdparty/taglib/toolkit/tlist.tcc index 60a81d36c..d6ba68f4e 100644 --- a/3rdparty/taglib/toolkit/tlist.tcc +++ b/3rdparty/taglib/toolkit/tlist.tcc @@ -52,8 +52,8 @@ template template class List::ListPrivate : public ListPrivateBase { public: - ListPrivate() : ListPrivateBase() {} - ListPrivate(const std::list &l) : ListPrivateBase(), list(l) {} + explicit ListPrivate() : ListPrivateBase() {} + explicit ListPrivate(const std::list &l) : ListPrivateBase(), list(l) {} void clear() { list.clear(); } @@ -66,8 +66,8 @@ template template class List::ListPrivate : public ListPrivateBase { public: - ListPrivate() : ListPrivateBase() {} - ListPrivate(const std::list &l) : ListPrivateBase(), list(l) {} + explicit ListPrivate() : ListPrivateBase() {} + explicit ListPrivate(const std::list &l) : ListPrivateBase(), list(l) {} ~ListPrivate() { clear(); } diff --git a/3rdparty/taglib/toolkit/tmap.h b/3rdparty/taglib/toolkit/tmap.h index d49658a14..afa06ce29 100644 --- a/3rdparty/taglib/toolkit/tmap.h +++ b/3rdparty/taglib/toolkit/tmap.h @@ -60,7 +60,7 @@ template class Map { /*! * Constructs an empty Map. */ - Map(); + explicit Map(); /*! * Make a shallow, implicitly shared, copy of \a m. diff --git a/3rdparty/taglib/toolkit/tmap.tcc b/3rdparty/taglib/toolkit/tmap.tcc index 4abdc617e..d81549f37 100644 --- a/3rdparty/taglib/toolkit/tmap.tcc +++ b/3rdparty/taglib/toolkit/tmap.tcc @@ -37,12 +37,12 @@ template template class Map::MapPrivate : public RefCounterOld { public: - MapPrivate() : RefCounterOld() {} + explicit MapPrivate() : RefCounterOld() {} #ifdef WANT_CLASS_INSTANTIATION_OF_MAP - MapPrivate(const std::map& m) : RefCounterOld(), map(m) {} + explicit MapPrivate(const std::map& m) : RefCounterOld(), map(m) {} std::map map; #else - MapPrivate(const std::map& m) : RefCounterOld(), map(m) {} + explicit MapPrivate(const std::map& m) : RefCounterOld(), map(m) {} std::map map; #endif }; diff --git a/3rdparty/taglib/toolkit/tpropertymap.h b/3rdparty/taglib/toolkit/tpropertymap.h index f0e590d27..2e67de019 100644 --- a/3rdparty/taglib/toolkit/tpropertymap.h +++ b/3rdparty/taglib/toolkit/tpropertymap.h @@ -107,7 +107,7 @@ class TAGLIB_EXPORT PropertyMap : public SimplePropertyMap { typedef SimplePropertyMap::Iterator Iterator; typedef SimplePropertyMap::ConstIterator ConstIterator; - PropertyMap(); + explicit PropertyMap(); /*! * Creates a PropertyMap initialized from a SimplePropertyMap. diff --git a/3rdparty/taglib/toolkit/trefcounter.h b/3rdparty/taglib/toolkit/trefcounter.h index 11fb015ca..8147bc198 100644 --- a/3rdparty/taglib/toolkit/trefcounter.h +++ b/3rdparty/taglib/toolkit/trefcounter.h @@ -58,7 +58,7 @@ namespace TagLib { class TAGLIB_EXPORT RefCounter { public: - RefCounter(); + explicit RefCounter(); virtual ~RefCounter(); void ref(); @@ -73,7 +73,7 @@ class TAGLIB_EXPORT RefCounter { // BIC this old class is needed by tlist.tcc and tmap.tcc class RefCounterOld { public: - RefCounterOld() : refCount(1) {} + explicit RefCounterOld() : refCount(1) {} # ifdef TAGLIB_ATOMIC_MAC void ref() { diff --git a/3rdparty/taglib/toolkit/tstring.cpp b/3rdparty/taglib/toolkit/tstring.cpp index 373821a71..061730427 100644 --- a/3rdparty/taglib/toolkit/tstring.cpp +++ b/3rdparty/taglib/toolkit/tstring.cpp @@ -158,8 +158,6 @@ class String::StringPrivate : public RefCounter { std::string cstring; }; -String String::null; - //////////////////////////////////////////////////////////////////////////////// // public members //////////////////////////////////////////////////////////////////////////////// @@ -400,10 +398,6 @@ bool String::isEmpty() const { return d->data.empty(); } -bool String::isNull() const { - return d == null.d; -} - ByteVector String::data(Type t) const { switch (t) { @@ -476,10 +470,6 @@ ByteVector String::data(Type t) const { } -int String::toInt() const { - return toInt(nullptr); -} - int String::toInt(bool *ok) const { const wchar_t *begin = d->data.c_str(); diff --git a/3rdparty/taglib/toolkit/tstring.h b/3rdparty/taglib/toolkit/tstring.h index ba456464c..cd1d2ae23 100644 --- a/3rdparty/taglib/toolkit/tstring.h +++ b/3rdparty/taglib/toolkit/tstring.h @@ -117,7 +117,7 @@ class TAGLIB_EXPORT String { /*! * Constructs an empty String. */ - String(); + explicit String(); /*! * Make a shallow, implicitly shared, copy of \a s. @@ -306,18 +306,6 @@ class TAGLIB_EXPORT String { */ bool isEmpty() const; - /*! - * Returns true if this string is null -- i.e. it is a copy of the String::null string. - * - * \note A string can be empty and not null. So do not use this method to check if the string is empty. - * - * \see isEmpty() - * - * \deprecated - */ - // BIC: remove - bool isNull() const; - /*! * Returns a ByteVector containing the string's data. * If \a t is Latin1 or UTF8, this will return a vector of 8 bit characters, otherwise it will use 16 bit characters. @@ -328,21 +316,13 @@ class TAGLIB_EXPORT String { */ ByteVector data(Type t) const; - /*! - * Convert the string to an integer. - * - * Returns the integer if the conversion was successful or 0 if the string does not represent a number. - */ - // BIC: merge with the method below - int toInt() const; - /*! * Convert the string to an integer. * * If the conversion was successful, it sets the value of \a *ok to true and returns the integer. * Otherwise it sets \a *ok to false and the result is undefined. */ - int toInt(bool *ok) const; + int toInt(bool *ok = nullptr) const; /*! * Returns a string with the leading and trailing whitespace stripped. @@ -480,16 +460,6 @@ class TAGLIB_EXPORT String { */ bool operator<(const String &s) const; - /*! - * A null string provided for convenience. - * - * \warning Do not modify this variable. It will mess up the internal state of TagLib. - * - * \deprecated - */ - // BIC: remove - static String null; - protected: /*! * If this String is being shared via implicit sharing, do a deep copy of the data and separate from the shared members. diff --git a/3rdparty/taglib/toolkit/tstringlist.h b/3rdparty/taglib/toolkit/tstringlist.h index 1b48a175a..f6346c874 100644 --- a/3rdparty/taglib/toolkit/tstringlist.h +++ b/3rdparty/taglib/toolkit/tstringlist.h @@ -47,7 +47,7 @@ class TAGLIB_EXPORT StringList : public List { /*! * Constructs an empty StringList. */ - StringList(); + explicit StringList(); /*! * Make a shallow, implicitly shared, copy of \a l. diff --git a/3rdparty/taglib/trueaudio/trueaudiofile.h b/3rdparty/taglib/trueaudio/trueaudiofile.h index ab85f7c72..df3add1bf 100644 --- a/3rdparty/taglib/trueaudio/trueaudiofile.h +++ b/3rdparty/taglib/trueaudio/trueaudiofile.h @@ -86,8 +86,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a TrueAudio file from \a file. @@ -97,7 +96,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a TrueAudio file from \a stream. @@ -107,7 +106,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs a TrueAudio file from \a stream. @@ -119,7 +118,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * * \note In the current implementation, \a propertiesStyle is ignored. */ - File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -218,8 +217,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/trueaudio/trueaudioproperties.h b/3rdparty/taglib/trueaudio/trueaudioproperties.h index 6df18d4c9..cf0fc963c 100644 --- a/3rdparty/taglib/trueaudio/trueaudioproperties.h +++ b/3rdparty/taglib/trueaudio/trueaudioproperties.h @@ -51,7 +51,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of TrueAudio::AudioProperties with the data read from the ByteVector \a data. */ - AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average); + explicit AudioProperties(const ByteVector &data, long streamLength, ReadStyle style = Average); /*! * Destroys this TrueAudio::AudioProperties instance. @@ -63,16 +63,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -105,8 +103,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int ttaVersion() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(const ByteVector &data, long streamLength); diff --git a/3rdparty/taglib/wavpack/wavpackfile.cpp b/3rdparty/taglib/wavpack/wavpackfile.cpp index 3105d5c27..dacf1fd65 100644 --- a/3rdparty/taglib/wavpack/wavpackfile.cpp +++ b/3rdparty/taglib/wavpack/wavpackfile.cpp @@ -51,10 +51,10 @@ enum { class WavPack::File::FilePrivate { public: - FilePrivate() : APELocation(-1), - APESize(0), - ID3v1Location(-1), - properties(nullptr) {} + explicit FilePrivate() : APELocation(-1), + APESize(0), + ID3v1Location(-1), + properties(nullptr) {} ~FilePrivate() { delete properties; diff --git a/3rdparty/taglib/wavpack/wavpackfile.h b/3rdparty/taglib/wavpack/wavpackfile.h index d209fa135..2d2348cee 100644 --- a/3rdparty/taglib/wavpack/wavpackfile.h +++ b/3rdparty/taglib/wavpack/wavpackfile.h @@ -89,8 +89,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * If \a readProperties is true the file's audio properties will also be read using \a propertiesStyle. * If false, \a propertiesStyle is ignored */ - File(FileName file, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an WavPack file from \a file. @@ -100,8 +99,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { * \note TagLib will *not* take ownership of the stream, the caller is * responsible for deleting it after the File object. */ - File(IOStream *stream, bool readProperties = true, - AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -207,8 +205,8 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File { static bool isSupported(IOStream *stream); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/wavpack/wavpackproperties.h b/3rdparty/taglib/wavpack/wavpackproperties.h index 4bebe38c5..c4f51a28d 100644 --- a/3rdparty/taglib/wavpack/wavpackproperties.h +++ b/3rdparty/taglib/wavpack/wavpackproperties.h @@ -54,7 +54,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro /*! * Create an instance of WavPack::Properties. */ - AudioProperties(File *file, long streamLength, ReadStyle style = Average); + explicit AudioProperties(File *file, long streamLength, ReadStyle style = Average); /*! * Destroys this WavPack::AudioProperties instance. @@ -67,16 +67,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro * * \see lengthInMilliseconds() */ - // BIC: make virtual - int lengthInSeconds() const; + virtual int lengthInSeconds() const; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - // BIC: make virtual - int lengthInMilliseconds() const; + virtual int lengthInMilliseconds() const; /*! * Returns the average bit rate of the file in kb/s. @@ -114,8 +112,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro int version() const; private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); void read(File *file, long streamLength); unsigned int seekFinalIndex(File *file, long streamLength); diff --git a/3rdparty/taglib/xm/xmfile.h b/3rdparty/taglib/xm/xmfile.h index aa055c53b..3feffe9b8 100644 --- a/3rdparty/taglib/xm/xmfile.h +++ b/3rdparty/taglib/xm/xmfile.h @@ -45,7 +45,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { * \note In the current implementation, both \a readProperties and \a propertiesStyle are ignored. * The audio properties are always read. */ - File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Constructs an Extended Module file from \a stream. @@ -55,7 +55,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase { * * \note TagLib will *not* take ownership of the stream, the caller is responsible for deleting it after the File object. */ - File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); + explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average); /*! * Destroys this instance of the File. @@ -91,8 +91,8 @@ class TAGLIB_EXPORT File : public Mod::FileBase { bool save(); private: - File(const File &); - File &operator=(const File &); + explicit File(const File&); + File &operator=(const File&); void read(bool readProperties); diff --git a/3rdparty/taglib/xm/xmproperties.h b/3rdparty/taglib/xm/xmproperties.h index 0705fa5c2..7efac2f2f 100644 --- a/3rdparty/taglib/xm/xmproperties.h +++ b/3rdparty/taglib/xm/xmproperties.h @@ -42,7 +42,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro LinearFreqTable = 1 // otherwise its the amiga freq. table }; - AudioProperties(AudioProperties::ReadStyle propertiesStyle); + explicit AudioProperties(AudioProperties::ReadStyle propertiesStyle); virtual ~AudioProperties(); int lengthInSeconds() const; @@ -74,8 +74,8 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro void setBpmSpeed(unsigned short bpmSpeed); private: - AudioProperties(const AudioProperties &); - AudioProperties &operator=(const AudioProperties &); + explicit AudioProperties(const AudioProperties&); + AudioProperties &operator=(const AudioProperties&); class AudioPropertiesPrivate; AudioPropertiesPrivate *d;