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

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