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

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