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;