taglib: Remove unused functions + add virtual and explicit

This commit is contained in:
Jonas Kvinge 2020-06-22 02:32:37 +02:00
parent 3a3dc02a66
commit 248e487dd5
117 changed files with 452 additions and 653 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;
}

View File

@ -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.
*/

View File

@ -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);

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -97,7 +97,7 @@ class TAGLIB_EXPORT Picture {
/*!
* Constructs an empty picture.
*/
Picture();
explicit Picture();
/*!
* Construct an picture as a copy of \a other.

View File

@ -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;
}

View File

@ -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);

View File

@ -45,7 +45,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag {
friend class File;
public:
Tag();
explicit Tag();
virtual ~Tag();

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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<AtomData> 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);

View File

@ -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.

View File

@ -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.

View File

@ -40,7 +40,7 @@ class TAGLIB_EXPORT Item {
int first, second;
};
Item();
explicit Item();
Item(const Item &item);
/*!

View File

@ -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.

View File

@ -43,8 +43,8 @@ typedef Strawberry_TagLib::TagLib::Map<String, Item> 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();

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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;

View File

@ -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;
};

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -68,7 +68,7 @@ typedef Map<ByteVector, FrameList> 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;

View File

@ -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();

View File

@ -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.

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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 &);
/*!

View File

@ -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<unsigned char>(*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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -336,10 +336,6 @@ List<FLAC::Picture *> Ogg::XiphComment::pictureList() {
return d->pictureList;
}
ByteVector Ogg::XiphComment::render() const {
return render(true);
}
ByteVector Ogg::XiphComment::render(bool addFramingBit) const {
ByteVector data;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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.

View File

@ -58,7 +58,7 @@ typedef Map<ByteVector, String> 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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;

14
3rdparty/taglib/tag.h vendored
View File

@ -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;

View File

@ -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;

View File

@ -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<unsigned int>(::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<unsigned char>(*it)];
return sum;
}
unsigned int ByteVector::toUInt(bool mostSignificantByteFirst) const {
return toNumber<unsigned int>(*this, 0, mostSignificantByteFirst);
}

View File

@ -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.
*/

View File

@ -44,7 +44,7 @@ class TAGLIB_EXPORT ByteVectorList : public List<ByteVector> {
/*!
* Construct an empty ByteVectorList.
*/
ByteVectorList();
explicit ByteVectorList();
/*!
* Destroys this ByteVectorList instance.

View File

@ -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.

View File

@ -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&);
};
/*!

View File

@ -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;

View File

@ -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.

Some files were not shown because too many files have changed in this diff Show More