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

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