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

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