From 9867bc947ec8e85fd5f283a50ba04d5df3f6ca9f Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sat, 15 Jul 2023 15:54:03 +0200 Subject: [PATCH] clang-tidy: Use override keyword run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-override' -fix --- 3rdparty/utf8-cpp/checked.h | 8 ++-- taglib/ape/apefile.h | 14 +++--- taglib/ape/apeproperties.h | 10 ++-- taglib/ape/apetag.h | 38 +++++++-------- taglib/asf/asffile.cpp | 44 ++++++++--------- taglib/asf/asffile.h | 14 +++--- taglib/asf/asfproperties.h | 10 ++-- taglib/asf/asftag.h | 38 +++++++-------- taglib/fileref.cpp | 2 +- taglib/fileref.h | 2 +- taglib/flac/flacfile.h | 14 +++--- taglib/flac/flacpicture.h | 6 +-- taglib/flac/flacproperties.h | 10 ++-- taglib/flac/flacunknownmetadatablock.h | 6 +-- taglib/it/itfile.h | 8 ++-- taglib/it/itproperties.h | 48 +++++++++---------- taglib/mod/modfile.h | 12 ++--- taglib/mod/modproperties.h | 10 ++-- taglib/mod/modtag.h | 34 ++++++------- taglib/mp4/mp4file.h | 14 +++--- taglib/mp4/mp4properties.h | 10 ++-- taglib/mp4/mp4tag.h | 38 +++++++-------- taglib/mpc/mpcfile.h | 14 +++--- taglib/mpc/mpcproperties.h | 10 ++-- taglib/mpeg/id3v1/id3v1tag.h | 30 ++++++------ .../mpeg/id3v2/frames/attachedpictureframe.h | 10 ++-- taglib/mpeg/id3v2/frames/chapterframe.h | 10 ++-- taglib/mpeg/id3v2/frames/commentsframe.h | 12 ++--- .../mpeg/id3v2/frames/eventtimingcodesframe.h | 8 ++-- .../frames/generalencapsulatedobjectframe.h | 8 ++-- taglib/mpeg/id3v2/frames/ownershipframe.h | 8 ++-- taglib/mpeg/id3v2/frames/podcastframe.h | 10 ++-- taglib/mpeg/id3v2/frames/popularimeterframe.h | 8 ++-- taglib/mpeg/id3v2/frames/privateframe.h | 8 ++-- .../mpeg/id3v2/frames/relativevolumeframe.h | 8 ++-- .../id3v2/frames/synchronizedlyricsframe.h | 8 ++-- .../mpeg/id3v2/frames/tableofcontentsframe.h | 10 ++-- .../id3v2/frames/textidentificationframe.h | 18 +++---- .../id3v2/frames/uniquefileidentifierframe.h | 10 ++-- taglib/mpeg/id3v2/frames/unknownframe.h | 8 ++-- .../id3v2/frames/unsynchronizedlyricsframe.h | 12 ++--- taglib/mpeg/id3v2/frames/urllinkframe.h | 22 ++++----- taglib/mpeg/id3v2/id3v2tag.h | 38 +++++++-------- taglib/mpeg/mpegfile.cpp | 6 +-- taglib/mpeg/mpegfile.h | 14 +++--- taglib/mpeg/mpegproperties.h | 10 ++-- taglib/ogg/flac/oggflacfile.h | 12 ++--- taglib/ogg/oggfile.h | 4 +- taglib/ogg/opus/opusfile.h | 12 ++--- taglib/ogg/opus/opusproperties.h | 10 ++-- taglib/ogg/speex/speexfile.h | 12 ++--- taglib/ogg/speex/speexproperties.h | 10 ++-- taglib/ogg/vorbis/vorbisfile.h | 12 ++--- taglib/ogg/vorbis/vorbisproperties.h | 10 ++-- taglib/ogg/xiphcomment.h | 36 +++++++------- taglib/riff/aiff/aifffile.h | 14 +++--- taglib/riff/aiff/aiffproperties.h | 10 ++-- taglib/riff/rifffile.h | 2 +- taglib/riff/wav/infotag.h | 32 ++++++------- taglib/riff/wav/wavfile.h | 14 +++--- taglib/riff/wav/wavproperties.h | 10 ++-- taglib/s3m/s3mfile.h | 12 ++--- taglib/s3m/s3mproperties.h | 44 ++++++++--------- taglib/tagunion.h | 36 +++++++------- taglib/toolkit/tbytevectorlist.h | 2 +- taglib/toolkit/tbytevectorstream.h | 26 +++++----- taglib/toolkit/tdebuglistener.cpp | 2 +- taglib/toolkit/tfilestream.h | 26 +++++----- taglib/toolkit/tlist.tcc | 2 +- taglib/toolkit/tpropertymap.h | 2 +- taglib/toolkit/tstringlist.h | 2 +- taglib/trueaudio/trueaudiofile.h | 14 +++--- taglib/trueaudio/trueaudioproperties.h | 12 ++--- taglib/wavpack/wavpackfile.h | 14 +++--- taglib/wavpack/wavpackproperties.h | 10 ++-- taglib/xm/xmfile.cpp | 24 +++++----- taglib/xm/xmfile.h | 12 ++--- taglib/xm/xmproperties.h | 20 ++++---- tests/plainfile.h | 6 +-- tests/test_fileref.cpp | 6 +-- tests/test_id3v2.cpp | 6 +-- tests/test_riff.cpp | 6 +-- 82 files changed, 587 insertions(+), 587 deletions(-) diff --git a/3rdparty/utf8-cpp/checked.h b/3rdparty/utf8-cpp/checked.h index 1706f854..467293e4 100644 --- a/3rdparty/utf8-cpp/checked.h +++ b/3rdparty/utf8-cpp/checked.h @@ -42,7 +42,7 @@ namespace utf8 uint32_t cp; public: invalid_code_point(uint32_t codepoint) : cp(codepoint) {} - virtual const char* what() const throw() { return "Invalid code point"; } + const char* what() const throw() override { return "Invalid code point"; } uint32_t code_point() const {return cp;} }; @@ -50,7 +50,7 @@ namespace utf8 uint8_t u8; public: invalid_utf8 (uint8_t u) : u8(u) {} - virtual const char* what() const throw() { return "Invalid UTF-8"; } + const char* what() const throw() override { return "Invalid UTF-8"; } uint8_t utf8_octet() const {return u8;} }; @@ -58,13 +58,13 @@ namespace utf8 uint16_t u16; public: invalid_utf16 (uint16_t u) : u16(u) {} - virtual const char* what() const throw() { return "Invalid UTF-16"; } + const char* what() const throw() override { return "Invalid UTF-16"; } uint16_t utf16_word() const {return u16;} }; class not_enough_room : public exception { public: - virtual const char* what() const throw() { return "Not enough space"; } + const char* what() const throw() override { return "Not enough space"; } }; /// The library API - functions intended to be called by the users diff --git a/taglib/ape/apefile.h b/taglib/ape/apefile.h index 754e05fd..ba442dde 100644 --- a/taglib/ape/apefile.h +++ b/taglib/ape/apefile.h @@ -107,39 +107,39 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. This will be an APE tag, an ID3v1 tag * or a combination of the two. */ - virtual TagLib::Tag *tag() const; + TagLib::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * If the file contains both an APE and an ID3v1 tag, only APE * will be converted to the PropertyMap. */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Removes unsupported properties. Forwards to the actual Tag's * removeUnsupportedProperties() function. */ - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. * Creates an APEv2 tag if necessary. A potentially existing ID3v1 * tag will be updated as well. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the APE::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Saves the file. @@ -147,7 +147,7 @@ namespace TagLib { * \note According to the official Monkey's Audio SDK, an APE file * can only have either ID3V1 or APE tags, so a parameter is used here. */ - virtual bool save(); + bool save() override; /*! * Returns a pointer to the ID3v1 tag of the file. diff --git a/taglib/ape/apeproperties.h b/taglib/ape/apeproperties.h index 2fd05038..f8d72685 100644 --- a/taglib/ape/apeproperties.h +++ b/taglib/ape/apeproperties.h @@ -59,29 +59,29 @@ namespace TagLib { /*! * Destroys this APE::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/ape/apetag.h b/taglib/ape/apetag.h index 4829379a..c0e7ae51 100644 --- a/taglib/ape/apetag.h +++ b/taglib/ape/apetag.h @@ -71,7 +71,7 @@ namespace TagLib { /*! * Destroys this Tag instance. */ - virtual ~Tag(); + ~Tag() override; /*! * Renders the in memory values to a ByteVector suitable for writing to @@ -87,21 +87,21 @@ namespace TagLib { // Reimplementations. - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &s); - virtual void setArtist(const String &s); - virtual void setAlbum(const String &s); - virtual void setComment(const String &s); - virtual void setGenre(const String &s); - virtual void setYear(unsigned int i); - virtual void setTrack(unsigned int i); + void setTitle(const String &s) override; + void setArtist(const String &s) override; + void setAlbum(const String &s) override; + void setComment(const String &s) override; + void setGenre(const String &s) override; + void setYear(unsigned int i) override; + void setTrack(unsigned int i) override; /*! * Implements the unified tag dictionary interface -- export function. @@ -117,9 +117,9 @@ namespace TagLib { * TRACK to TRACKNUMBER, YEAR to DATE, and ALBUM ARTIST to ALBUMARTIST, respectively, * in order to be compliant with the names used in other formats. */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified tag dictionary interface -- import function. The same @@ -127,7 +127,7 @@ namespace TagLib { * specification requires keys to have between 2 and 16 printable ASCII characters * with the exception of the fixed strings "ID3", "TAG", "OGGS", and "MP+". */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Check if the given String is a valid APE tag key. @@ -181,7 +181,7 @@ namespace TagLib { /*! * Returns true if the tag does not contain any data. */ - bool isEmpty() const; + bool isEmpty() const override; protected: diff --git a/taglib/asf/asffile.cpp b/taglib/asf/asffile.cpp index fabb7e69..921f6f48 100644 --- a/taglib/asf/asffile.cpp +++ b/taglib/asf/asffile.cpp @@ -114,56 +114,56 @@ class ASF::File::FilePrivate::UnknownObject : public ASF::File::FilePrivate::Bas ByteVector myGuid; public: UnknownObject(const ByteVector &guid); - ByteVector guid() const; + ByteVector guid() const override; }; class ASF::File::FilePrivate::FilePropertiesObject : public ASF::File::FilePrivate::BaseObject { public: - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; }; class ASF::File::FilePrivate::StreamPropertiesObject : public ASF::File::FilePrivate::BaseObject { public: - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; }; class ASF::File::FilePrivate::ContentDescriptionObject : public ASF::File::FilePrivate::BaseObject { public: - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); - ByteVector render(ASF::File *file); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; + ByteVector render(ASF::File *file) override; }; class ASF::File::FilePrivate::ExtendedContentDescriptionObject : public ASF::File::FilePrivate::BaseObject { public: ByteVectorList attributeData; - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); - ByteVector render(ASF::File *file); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; + ByteVector render(ASF::File *file) override; }; class ASF::File::FilePrivate::MetadataObject : public ASF::File::FilePrivate::BaseObject { public: ByteVectorList attributeData; - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); - ByteVector render(ASF::File *file); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; + ByteVector render(ASF::File *file) override; }; class ASF::File::FilePrivate::MetadataLibraryObject : public ASF::File::FilePrivate::BaseObject { public: ByteVectorList attributeData; - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); - ByteVector render(ASF::File *file); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; + ByteVector render(ASF::File *file) override; }; class ASF::File::FilePrivate::HeaderExtensionObject : public ASF::File::FilePrivate::BaseObject @@ -171,16 +171,16 @@ class ASF::File::FilePrivate::HeaderExtensionObject : public ASF::File::FilePriv public: List objects; HeaderExtensionObject(); - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); - ByteVector render(ASF::File *file); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; + ByteVector render(ASF::File *file) override; }; class ASF::File::FilePrivate::CodecListObject : public ASF::File::FilePrivate::BaseObject { public: - ByteVector guid() const; - void parse(ASF::File *file, unsigned int size); + ByteVector guid() const override; + void parse(ASF::File *file, unsigned int size) override; private: enum CodecType diff --git a/taglib/asf/asffile.h b/taglib/asf/asffile.h index 5cabc38f..16d12cd3 100644 --- a/taglib/asf/asffile.h +++ b/taglib/asf/asffile.h @@ -71,7 +71,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns a pointer to the ASF tag of the file. @@ -83,35 +83,35 @@ namespace TagLib { * deleted by the user. It will be deleted when the file (object) is * destroyed. */ - virtual Tag *tag() const; + Tag *tag() const override; /*! * Implements the unified property interface -- export function. */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Removes unsupported properties. Forwards to the actual Tag's * removeUnsupportedProperties() function. */ - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the ASF audio properties for this file. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Returns whether or not the given \a stream can be opened as an ASF diff --git a/taglib/asf/asfproperties.h b/taglib/asf/asfproperties.h index 51f4b9b3..6efb8ad3 100644 --- a/taglib/asf/asfproperties.h +++ b/taglib/asf/asfproperties.h @@ -76,29 +76,29 @@ namespace TagLib { /*! * Destroys this ASF::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/asf/asftag.h b/taglib/asf/asftag.h index 297ea6de..c19f6deb 100644 --- a/taglib/asf/asftag.h +++ b/taglib/asf/asftag.h @@ -47,34 +47,34 @@ namespace TagLib { Tag(); - virtual ~Tag(); + ~Tag() override; /*! * Returns the track name. */ - virtual String title() const; + String title() const override; /*! * Returns the artist name. */ - virtual String artist() const; + String artist() const override; /*! * Returns the album name; if no album name is present in the tag * String::null will be returned. */ - virtual String album() const; + String album() const override; /*! * Returns the track comment. */ - virtual String comment() const; + String comment() const override; /*! * Returns the genre name; if no genre is present in the tag String::null * will be returned. */ - virtual String genre() const; + String genre() const override; /*! * Returns the rating. @@ -90,34 +90,34 @@ namespace TagLib { /*! * Returns the year; if there is no year set, this will return 0. */ - virtual unsigned int year() const; + unsigned int year() const override; /*! * Returns the track number; if there is no track number set, this will * return 0. */ - virtual unsigned int track() const; + unsigned int track() const override; /*! * Sets the title to \a s. */ - virtual void setTitle(const String &s); + void setTitle(const String &s) override; /*! * Sets the artist to \a s. */ - virtual void setArtist(const String &s); + void setArtist(const String &s) override; /*! * Sets the album to \a s. If \a s is String::null then this value will be * cleared. */ - virtual void setAlbum(const String &s); + void setAlbum(const String &s) override; /*! * Sets the comment to \a s. */ - virtual void setComment(const String &s); + void setComment(const String &s) override; /*! * Sets the rating to \a s. @@ -132,24 +132,24 @@ namespace TagLib { /*! * Sets the genre to \a s. */ - virtual void setGenre(const String &s); + void setGenre(const String &s) override; /*! * Sets the year to \a i. If \a s is 0 then this value will be cleared. */ - virtual void setYear(unsigned int i); + void setYear(unsigned int i) override; /*! * Sets the track to \a i. If \a s is 0 then this value will be cleared. */ - virtual void setTrack(unsigned int i); + void setTrack(unsigned int i) override; /*! * Returns true if the tag does not contain any data. This should be * reimplemented in subclasses that provide more than the basic tagging * abilities in this class. */ - virtual bool isEmpty() const; + bool isEmpty() const override; /*! * \warning You should not modify this data structure directly, instead @@ -197,9 +197,9 @@ namespace TagLib { */ void addAttribute(const String &name, const Attribute &attribute); - PropertyMap properties() const; - void removeUnsupportedProperties(const StringList& properties); - PropertyMap setProperties(const PropertyMap &properties); + PropertyMap properties() const override; + void removeUnsupportedProperties(const StringList& properties) override; + PropertyMap setProperties(const PropertyMap &properties) override; private: diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 7465221a..cf08b5b6 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -301,7 +301,7 @@ public: file(0), stream(0) {} - ~FileRefPrivate() { + ~FileRefPrivate() override { delete file; delete stream; } diff --git a/taglib/fileref.h b/taglib/fileref.h index 0f04b38a..085c21f2 100644 --- a/taglib/fileref.h +++ b/taglib/fileref.h @@ -118,7 +118,7 @@ namespace TagLib { /*! * Destroys this StreamTypeResolver instance. */ - virtual ~StreamTypeResolver() = 0; + ~StreamTypeResolver() override = 0; virtual File *createFileFromStream(IOStream *stream, bool readAudioProperties = true, diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h index bd553555..e7663f5d 100644 --- a/taglib/flac/flacfile.h +++ b/taglib/flac/flacfile.h @@ -128,7 +128,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. This will be a union of XiphComment, @@ -138,7 +138,7 @@ namespace TagLib { * \see ID3v1Tag() * \see XiphComment() */ - virtual TagLib::Tag *tag() const; + TagLib::Tag *tag() const override; /*! * Implements the unified property interface -- export function. @@ -146,9 +146,9 @@ namespace TagLib { * only the first one (in the order XiphComment, ID3v2, ID3v1) will be * converted to the PropertyMap. */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &); + void removeUnsupportedProperties(const StringList &) override; /*! * Implements the unified property interface -- import function. @@ -157,13 +157,13 @@ namespace TagLib { * Ignores any changes to ID3v1 or ID3v2 comments since they are not allowed * in the FLAC specification. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the FLAC::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. This will primarily save the XiphComment, but @@ -172,7 +172,7 @@ namespace TagLib { * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Returns a pointer to the ID3v2 tag of the file. diff --git a/taglib/flac/flacpicture.h b/taglib/flac/flacpicture.h index 2cde3aa1..3d3e2364 100644 --- a/taglib/flac/flacpicture.h +++ b/taglib/flac/flacpicture.h @@ -88,7 +88,7 @@ namespace TagLib { Picture(); Picture(const ByteVector &data); - ~Picture(); + ~Picture() override; /*! * Returns the type of the image. @@ -177,12 +177,12 @@ namespace TagLib { /*! * Returns the FLAC metadata block type. */ - int code() const; + int code() const override; /*! * Render the content to the FLAC picture block format. */ - ByteVector render() const; + ByteVector render() const override; /*! * Parse the picture data in the FLAC picture block format. diff --git a/taglib/flac/flacproperties.h b/taglib/flac/flacproperties.h index 442da6ea..8bd34c03 100644 --- a/taglib/flac/flacproperties.h +++ b/taglib/flac/flacproperties.h @@ -55,29 +55,29 @@ namespace TagLib { /*! * Destroys this FLAC::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample as read from the FLAC diff --git a/taglib/flac/flacunknownmetadatablock.h b/taglib/flac/flacunknownmetadatablock.h index 25e66c90..12c4cc1d 100644 --- a/taglib/flac/flacunknownmetadatablock.h +++ b/taglib/flac/flacunknownmetadatablock.h @@ -37,12 +37,12 @@ namespace TagLib { { public: UnknownMetadataBlock(int blockType, const ByteVector &data); - ~UnknownMetadataBlock(); + ~UnknownMetadataBlock() override; /*! * Returns the FLAC metadata block type. */ - int code() const; + int code() const override; /*! * Sets the FLAC metadata block type. @@ -62,7 +62,7 @@ namespace TagLib { /*! * Render the content of the block. */ - ByteVector render() const; + ByteVector render() const override; private: UnknownMetadataBlock(const MetadataBlock &item); diff --git a/taglib/it/itfile.h b/taglib/it/itfile.h index 1691a181..168c319d 100644 --- a/taglib/it/itfile.h +++ b/taglib/it/itfile.h @@ -63,15 +63,15 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; - Mod::Tag *tag() const; + Mod::Tag *tag() const override; /*! * Returns the IT::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - IT::Properties *audioProperties() const; + IT::Properties *audioProperties() const override; /*! * Save the file. @@ -79,7 +79,7 @@ namespace TagLib { * * \note Saving Impulse Tracker tags is not supported. */ - bool save(); + bool save() override; private: diff --git a/taglib/it/itproperties.h b/taglib/it/itproperties.h index 58f9361e..6853eb55 100644 --- a/taglib/it/itproperties.h +++ b/taglib/it/itproperties.h @@ -53,41 +53,41 @@ namespace TagLib { }; Properties(AudioProperties::ReadStyle propertiesStyle); - virtual ~Properties(); + ~Properties() override; - int channels() const; + int channels() const override; - unsigned short lengthInPatterns() const; - bool stereo() const; - unsigned short instrumentCount() const; - unsigned short sampleCount() const; - unsigned short patternCount() const; - unsigned short version() const; + unsigned short lengthInPatterns() const; + bool stereo() const; + unsigned short instrumentCount() const; + unsigned short sampleCount() const; + unsigned short patternCount() const; + unsigned short version() const; unsigned short compatibleVersion() const; - unsigned short flags() const; - unsigned short special() const; - unsigned char globalVolume() const; - unsigned char mixVolume() const; - unsigned char tempo() const; - unsigned char bpmSpeed() const; - unsigned char panningSeparation() const; - unsigned char pitchWheelDepth() const; + unsigned short flags() const; + unsigned short special() const; + unsigned char globalVolume() const; + unsigned char mixVolume() const; + unsigned char tempo() const; + unsigned char bpmSpeed() const; + unsigned char panningSeparation() const; + unsigned char pitchWheelDepth() const; void setChannels(int channels); void setLengthInPatterns(unsigned short lengthInPatterns); void setInstrumentCount(unsigned short instrumentCount); - void setSampleCount (unsigned short sampleCount); + void setSampleCount(unsigned short sampleCount); void setPatternCount(unsigned short patternCount); - void setVersion (unsigned short version); + void setVersion(unsigned short version); void setCompatibleVersion(unsigned short compatibleVersion); - void setFlags (unsigned short flags); - void setSpecial (unsigned short special); + void setFlags(unsigned short flags); + void setSpecial(unsigned short special); void setGlobalVolume(unsigned char globalVolume); - void setMixVolume (unsigned char mixVolume); - void setTempo (unsigned char tempo); - void setBpmSpeed (unsigned char bpmSpeed); + void setMixVolume(unsigned char mixVolume); + void setTempo(unsigned char tempo); + void setBpmSpeed(unsigned char bpmSpeed); void setPanningSeparation(unsigned char panningSeparation); - void setPitchWheelDepth (unsigned char pitchWheelDepth); + void setPitchWheelDepth(unsigned char pitchWheelDepth); private: Properties(const Properties&); diff --git a/taglib/mod/modfile.h b/taglib/mod/modfile.h index 2d17dbef..08cef8d6 100644 --- a/taglib/mod/modfile.h +++ b/taglib/mod/modfile.h @@ -66,26 +66,26 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; - Mod::Tag *tag() const; + Mod::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * Forwards to Mod::Tag::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified property interface -- import function. * Forwards to Mod::Tag::setProperties(). */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the Mod::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - Mod::Properties *audioProperties() const; + Mod::Properties *audioProperties() const override; /*! * Save the file. @@ -93,7 +93,7 @@ namespace TagLib { * * \note Saving Protracker tags is not supported. */ - bool save(); + bool save() override; private: File(const File &); diff --git a/taglib/mod/modproperties.h b/taglib/mod/modproperties.h index 5825e3bf..28f2d15e 100644 --- a/taglib/mod/modproperties.h +++ b/taglib/mod/modproperties.h @@ -35,13 +35,13 @@ namespace TagLib { { public: Properties(AudioProperties::ReadStyle propertiesStyle); - virtual ~Properties(); + ~Properties() override; - int bitrate() const; - int sampleRate() const; - int channels() const; + int bitrate() const override; + int sampleRate() const override; + int channels() const override; - unsigned int instrumentCount() const; + unsigned int instrumentCount() const; unsigned char lengthInPatterns() const; void setChannels(int channels); diff --git a/taglib/mod/modtag.h b/taglib/mod/modtag.h index f51a2e42..99b635ac 100644 --- a/taglib/mod/modtag.h +++ b/taglib/mod/modtag.h @@ -46,45 +46,45 @@ namespace TagLib { { public: Tag(); - virtual ~Tag(); + ~Tag() override; /*! * Returns the track name; if no track name is present in the tag * String::null will be returned. */ - virtual String title() const; + String title() const override; /*! * Not supported by module files. Therefore always returns String::null. */ - virtual String artist() const; + String artist() const override; /*! * Not supported by module files. Therefore always returns String::null. */ - virtual String album() const; + String album() const override; /*! * Returns the track comment derived from the instrument/sample/pattern * names; if no comment is present in the tag String::null will be * returned. */ - virtual String comment() const; + String comment() const override; /*! * Not supported by module files. Therefore always returns String::null. */ - virtual String genre() const; + String genre() const override; /*! * Not supported by module files. Therefore always returns 0. */ - virtual unsigned int year() const; + unsigned int year() const override; /*! * Not supported by module files. Therefore always returns 0. */ - virtual unsigned int track() const; + unsigned int track() const override; /*! * Returns the name of the tracker used to create/edit the module file. @@ -103,17 +103,17 @@ namespace TagLib { * Mod 20 characters, S3M 27 characters, IT 25 characters and XM 20 * characters. */ - virtual void setTitle(const String &title); + void setTitle(const String &title) override; /*! * Not supported by module files and therefore ignored. */ - virtual void setArtist(const String &artist); + void setArtist(const String &artist) override; /*! * Not supported by module files and therefore ignored. */ - virtual void setAlbum(const String &album); + void setAlbum(const String &album) override; /*! * Sets the comment to \a comment. If \a comment is String::null then @@ -132,22 +132,22 @@ namespace TagLib { * Mod 22 characters, S3M 27 characters, IT 25 characters and XM 22 * characters. */ - virtual void setComment(const String &comment); + void setComment(const String &comment) override; /*! * Not supported by module files and therefore ignored. */ - virtual void setGenre(const String &genre); + void setGenre(const String &genre) override; /*! * Not supported by module files and therefore ignored. */ - virtual void setYear(unsigned int year); + void setYear(unsigned int year) override; /*! * Not supported by module files and therefore ignored. */ - virtual void setTrack(unsigned int track); + void setTrack(unsigned int track) override; /*! * Sets the tracker name to \a trackerName. If \a trackerName is @@ -165,7 +165,7 @@ namespace TagLib { * Implements the unified property interface -- export function. * Since the module tag is very limited, the exported map is as well. */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified property interface -- import function. @@ -175,7 +175,7 @@ namespace TagLib { * all but the first will be contained in the returned map of unsupported * properties. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; private: Tag(const Tag &); diff --git a/taglib/mp4/mp4file.h b/taglib/mp4/mp4file.h index b8f0a7c2..d00f5bb3 100644 --- a/taglib/mp4/mp4file.h +++ b/taglib/mp4/mp4file.h @@ -83,7 +83,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns a pointer to the MP4 tag of the file. @@ -95,35 +95,35 @@ namespace TagLib { * deleted by the user. It will be deleted when the file (object) is * destroyed. */ - Tag *tag() const; + Tag *tag() const override; /*! * Implements the unified property interface -- export function. */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Removes unsupported properties. Forwards to the actual Tag's * removeUnsupportedProperties() function. */ - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the MP4 audio properties for this file. */ - Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. * * This returns true if the save was successful. */ - bool save(); + bool save() override; /*! * This will strip the tags that match the OR-ed together TagTypes from the diff --git a/taglib/mp4/mp4properties.h b/taglib/mp4/mp4properties.h index 0f9c349e..ee744621 100644 --- a/taglib/mp4/mp4properties.h +++ b/taglib/mp4/mp4properties.h @@ -45,29 +45,29 @@ namespace TagLib { }; Properties(File *file, Atoms *atoms, ReadStyle style = Average); - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/mp4/mp4tag.h b/taglib/mp4/mp4tag.h index 1a43acaf..0ba29230 100644 --- a/taglib/mp4/mp4tag.h +++ b/taglib/mp4/mp4tag.h @@ -44,26 +44,26 @@ namespace TagLib { public: Tag(); Tag(TagLib::File *file, Atoms *atoms); - virtual ~Tag(); + ~Tag() override; bool save(); - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &value); - virtual void setArtist(const String &value); - virtual void setAlbum(const String &value); - virtual void setComment(const String &value); - virtual void setGenre(const String &value); - virtual void setYear(unsigned int value); - virtual void setTrack(unsigned int value); + void setTitle(const String &value) override; + void setArtist(const String &value) override; + void setAlbum(const String &value) override; + void setComment(const String &value) override; + void setGenre(const String &value) override; + void setYear(unsigned int value) override; + void setTrack(unsigned int value) override; - virtual bool isEmpty() const; + bool isEmpty() const override; /*! * Returns a string-keyed map of the MP4::Items for this tag. @@ -96,9 +96,9 @@ namespace TagLib { */ bool strip(); - PropertyMap properties() const; - void removeUnsupportedProperties(const StringList& properties); - PropertyMap setProperties(const PropertyMap &properties); + PropertyMap properties() const override; + void removeUnsupportedProperties(const StringList& properties) override; + PropertyMap setProperties(const PropertyMap &properties) override; protected: /*! diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h index bab0f6c9..ddee0849 100644 --- a/taglib/mpc/mpcfile.h +++ b/taglib/mpc/mpcfile.h @@ -107,42 +107,42 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. This will be an APE tag, an ID3v1 tag * or a combination of the two. */ - virtual TagLib::Tag *tag() const; + TagLib::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * If the file contains both an APE and an ID3v1 tag, only the APE * tag will be converted to the PropertyMap. */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. * Affects only the APEv2 tag which will be created if necessary. * If an ID3v1 tag exists, it will be updated as well. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the MPC::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Saves the file. * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Returns a pointer to the ID3v1 tag of the file. diff --git a/taglib/mpc/mpcproperties.h b/taglib/mpc/mpcproperties.h index 452413b8..3183a26f 100644 --- a/taglib/mpc/mpcproperties.h +++ b/taglib/mpc/mpcproperties.h @@ -57,29 +57,29 @@ namespace TagLib { /*! * Destroys this MPC::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the version of the bitstream (SV4-SV8) diff --git a/taglib/mpeg/id3v1/id3v1tag.h b/taglib/mpeg/id3v1/id3v1tag.h index bc2ed90e..c59de068 100644 --- a/taglib/mpeg/id3v1/id3v1tag.h +++ b/taglib/mpeg/id3v1/id3v1tag.h @@ -119,7 +119,7 @@ namespace TagLib { /*! * Destroys this Tag instance. */ - virtual ~Tag(); + ~Tag() override; /*! * Renders the in memory values to a ByteVector suitable for writing to @@ -135,21 +135,21 @@ namespace TagLib { // Reimplementations. - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &s); - virtual void setArtist(const String &s); - virtual void setAlbum(const String &s); - virtual void setComment(const String &s); - virtual void setGenre(const String &s); - virtual void setYear(unsigned int i); - virtual void setTrack(unsigned int i); + void setTitle(const String &s) override; + void setArtist(const String &s) override; + void setAlbum(const String &s) override; + void setComment(const String &s) override; + void setGenre(const String &s) override; + void setYear(unsigned int i) override; + void setTrack(unsigned int i) override; /*! * Returns the genre in number. diff --git a/taglib/mpeg/id3v2/frames/attachedpictureframe.h b/taglib/mpeg/id3v2/frames/attachedpictureframe.h index 18755f39..9b317eff 100644 --- a/taglib/mpeg/id3v2/frames/attachedpictureframe.h +++ b/taglib/mpeg/id3v2/frames/attachedpictureframe.h @@ -111,12 +111,12 @@ namespace TagLib { /*! * Destroys the AttahcedPictureFrame instance. */ - virtual ~AttachedPictureFrame(); + ~AttachedPictureFrame() override; /*! * Returns a string containing the description and mime-type */ - virtual String toString() const; + String toString() const override; /*! * Returns the text encoding used for the description. @@ -203,8 +203,8 @@ namespace TagLib { void setPicture(const ByteVector &p); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; class AttachedPictureFramePrivate; AttachedPictureFramePrivate *d; @@ -219,7 +219,7 @@ namespace TagLib { class TAGLIB_EXPORT AttachedPictureFrameV22 : public AttachedPictureFrame { protected: - virtual void parseFields(const ByteVector &data); + void parseFields(const ByteVector &data) override; private: AttachedPictureFrameV22(const ByteVector &data, Header *h); friend class FrameFactory; diff --git a/taglib/mpeg/id3v2/frames/chapterframe.h b/taglib/mpeg/id3v2/frames/chapterframe.h index 08b11911..e3c49dfe 100644 --- a/taglib/mpeg/id3v2/frames/chapterframe.h +++ b/taglib/mpeg/id3v2/frames/chapterframe.h @@ -69,7 +69,7 @@ namespace TagLib { /*! * Destroys the frame. */ - virtual ~ChapterFrame(); + ~ChapterFrame() override; /*! * Returns the element ID of the frame. Element ID @@ -218,9 +218,9 @@ namespace TagLib { */ void removeEmbeddedFrames(const ByteVector &id); - virtual String toString() const; + String toString() const override; - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * CHAP frames each have a unique element ID. This searches for a CHAP @@ -232,8 +232,8 @@ namespace TagLib { static ChapterFrame *findByElementID(const Tag *tag, const ByteVector &eID); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); diff --git a/taglib/mpeg/id3v2/frames/commentsframe.h b/taglib/mpeg/id3v2/frames/commentsframe.h index 74c7ff48..6837a70f 100644 --- a/taglib/mpeg/id3v2/frames/commentsframe.h +++ b/taglib/mpeg/id3v2/frames/commentsframe.h @@ -59,14 +59,14 @@ namespace TagLib { /*! * Destroys this CommentFrame instance. */ - virtual ~CommentsFrame(); + ~CommentsFrame() override; /*! * Returns the text of this comment. * * \see text() */ - virtual String toString() const; + String toString() const override; /*! * Returns the language encoding as a 3 byte encoding as specified by @@ -115,7 +115,7 @@ namespace TagLib { * * \see text() */ - virtual void setText(const String &s); + void setText(const String &s) override; /*! * Returns the text encoding that will be used in rendering this frame. @@ -145,7 +145,7 @@ namespace TagLib { * - otherwise, the key will be "COMMENT:" * - The single value will be the frame's text(). */ - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * Comments each have a unique description. This searches for a comment @@ -159,8 +159,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h b/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h index 9146bdc9..8df2f017 100644 --- a/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h +++ b/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h @@ -131,12 +131,12 @@ namespace TagLib { /*! * Destroys this EventTimingCodesFrame instance. */ - virtual ~EventTimingCodesFrame(); + ~EventTimingCodesFrame() override; /*! * Returns a null string. */ - virtual String toString() const; + String toString() const override; /*! * Returns the timestamp format. @@ -165,8 +165,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h b/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h index cb797b88..e021d725 100644 --- a/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h +++ b/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h @@ -72,12 +72,12 @@ namespace TagLib { /*! * Destroys the GeneralEncapsulatedObjectFrame instance. */ - virtual ~GeneralEncapsulatedObjectFrame(); + ~GeneralEncapsulatedObjectFrame() override; /*! * Returns a string containing the description, file name and mime-type */ - virtual String toString() const; + String toString() const override; /*! * Returns the text encoding used for the description and file name. @@ -162,8 +162,8 @@ namespace TagLib { void setObject(const ByteVector &object); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h); diff --git a/taglib/mpeg/id3v2/frames/ownershipframe.h b/taglib/mpeg/id3v2/frames/ownershipframe.h index 24113b18..8b1b7043 100644 --- a/taglib/mpeg/id3v2/frames/ownershipframe.h +++ b/taglib/mpeg/id3v2/frames/ownershipframe.h @@ -58,14 +58,14 @@ namespace TagLib { /*! * Destroys this OwnershipFrame instance. */ - virtual ~OwnershipFrame(); + ~OwnershipFrame() override; /*! * Returns the text of this popularimeter. * * \see text() */ - virtual String toString() const; + String toString() const override; /*! * Returns the date purchased. @@ -131,8 +131,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/podcastframe.h b/taglib/mpeg/id3v2/frames/podcastframe.h index 960748c0..94695e7b 100644 --- a/taglib/mpeg/id3v2/frames/podcastframe.h +++ b/taglib/mpeg/id3v2/frames/podcastframe.h @@ -50,20 +50,20 @@ namespace TagLib { /*! * Destroys this PodcastFrame instance. */ - virtual ~PodcastFrame(); + ~PodcastFrame() override; /*! * Returns a null string. */ - virtual String toString() const; + String toString() const override; - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/popularimeterframe.h b/taglib/mpeg/id3v2/frames/popularimeterframe.h index 59860b42..3d6c1e20 100644 --- a/taglib/mpeg/id3v2/frames/popularimeterframe.h +++ b/taglib/mpeg/id3v2/frames/popularimeterframe.h @@ -58,14 +58,14 @@ namespace TagLib { /*! * Destroys this PopularimeterFrame instance. */ - virtual ~PopularimeterFrame(); + ~PopularimeterFrame() override; /*! * Returns the text of this popularimeter. * * \see text() */ - virtual String toString() const; + String toString() const override; /*! * Returns the email. @@ -112,8 +112,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/privateframe.h b/taglib/mpeg/id3v2/frames/privateframe.h index eeed521c..3c5810cd 100644 --- a/taglib/mpeg/id3v2/frames/privateframe.h +++ b/taglib/mpeg/id3v2/frames/privateframe.h @@ -56,14 +56,14 @@ namespace TagLib { /*! * Destroys this private frame instance. */ - virtual ~PrivateFrame(); + ~PrivateFrame() override; /*! * Returns the text of this private frame, currently just the owner. * * \see text() */ - virtual String toString() const; + String toString() const override; /*! * \return The owner of the private frame. @@ -90,8 +90,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/taglib/mpeg/id3v2/frames/relativevolumeframe.h index 503eed35..f0ddd8c0 100644 --- a/taglib/mpeg/id3v2/frames/relativevolumeframe.h +++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.h @@ -114,14 +114,14 @@ namespace TagLib { /*! * Destroys the RelativeVolumeFrame instance. */ - virtual ~RelativeVolumeFrame(); + ~RelativeVolumeFrame() override; /*! * Returns the frame's identification. * * \see identification() */ - virtual String toString() const; + String toString() const override; /*! * Returns a list of channels with information currently in the frame. @@ -214,8 +214,8 @@ namespace TagLib { void setIdentification(const String &s); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: RelativeVolumeFrame(const ByteVector &data, Header *h); diff --git a/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h b/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h index a701d215..6d331070 100644 --- a/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h +++ b/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h @@ -109,14 +109,14 @@ namespace TagLib { /*! * Destroys this SynchronizedLyricsFrame instance. */ - virtual ~SynchronizedLyricsFrame(); + ~SynchronizedLyricsFrame() override; /*! * Returns the description of this synchronized lyrics frame. * * \see description() */ - virtual String toString() const; + String toString() const override; /*! * Returns the text encoding that will be used in rendering this frame. @@ -211,8 +211,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.h b/taglib/mpeg/id3v2/frames/tableofcontentsframe.h index 18279f73..600710b5 100644 --- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.h +++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.h @@ -65,7 +65,7 @@ namespace TagLib { /*! * Destroys the frame. */ - ~TableOfContentsFrame(); + ~TableOfContentsFrame() override; /*! * Returns the elementID of the frame. Element ID @@ -220,9 +220,9 @@ namespace TagLib { */ void removeEmbeddedFrames(const ByteVector &id); - virtual String toString() const; + String toString() const override; - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * CTOC frames each have a unique element ID. This searches for a CTOC @@ -243,8 +243,8 @@ namespace TagLib { static TableOfContentsFrame *findTopLevel(const Tag *tag); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.h b/taglib/mpeg/id3v2/frames/textidentificationframe.h index 4c783be7..ec3c278a 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.h +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.h @@ -142,7 +142,7 @@ namespace TagLib { /*! * Destroys this TextIdentificationFrame instance. */ - virtual ~TextIdentificationFrame(); + ~TextIdentificationFrame() override; /*! * Text identification frames are a list of string fields. @@ -158,8 +158,8 @@ namespace TagLib { // Reimplementations. - virtual void setText(const String &s); - virtual String toString() const; + void setText(const String &s) override; + String toString() const override; /*! * Returns the text encoding that will be used in rendering this frame. @@ -195,13 +195,13 @@ namespace TagLib { */ static const KeyConversionMap &involvedPeopleMap(); - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; /*! * The constructor used by the FrameFactory. @@ -258,7 +258,7 @@ namespace TagLib { */ UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding = String::UTF8); - virtual String toString() const; + String toString() const override; /*! * Returns the description for this frame. @@ -273,7 +273,7 @@ namespace TagLib { void setDescription(const String &s); StringList fieldList() const; - void setText(const String &text); + void setText(const String &text) override; void setText(const StringList &fields); /*! @@ -289,7 +289,7 @@ namespace TagLib { * in the value list, in order to be compatible with TagLib which copies * the description() into the fieldList(). */ - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * Searches for the user defined text frame with the description \a description diff --git a/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h b/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h index 6ab855d6..20c2ad90 100644 --- a/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h +++ b/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h @@ -59,7 +59,7 @@ namespace TagLib { /*! * Destroys the frame. */ - ~UniqueFileIdentifierFrame(); + ~UniqueFileIdentifierFrame() override; /*! * Returns the owner for the frame; essentially this is the key for @@ -92,9 +92,9 @@ namespace TagLib { */ void setIdentifier(const ByteVector &v); - virtual String toString() const; + String toString() const override; - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * UFID frames each have a unique owner. This searches for a UFID @@ -105,8 +105,8 @@ namespace TagLib { static UniqueFileIdentifierFrame *findByOwner(const Tag *tag, const String &o); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: UniqueFileIdentifierFrame(const UniqueFileIdentifierFrame &); diff --git a/taglib/mpeg/id3v2/frames/unknownframe.h b/taglib/mpeg/id3v2/frames/unknownframe.h index 22237021..e738284c 100644 --- a/taglib/mpeg/id3v2/frames/unknownframe.h +++ b/taglib/mpeg/id3v2/frames/unknownframe.h @@ -52,9 +52,9 @@ namespace TagLib { public: UnknownFrame(const ByteVector &data); - virtual ~UnknownFrame(); + ~UnknownFrame() override; - virtual String toString() const; + String toString() const override; /*! * Returns the field data (everything but the header) for this frame. @@ -62,8 +62,8 @@ namespace TagLib { ByteVector data() const; protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: UnknownFrame(const ByteVector &data, Header *h); diff --git a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h index ae9bcb1a..4714bd9c 100644 --- a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h +++ b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h @@ -57,14 +57,14 @@ namespace TagLib { /*! * Destroys this UnsynchronizedLyricsFrame instance. */ - virtual ~UnsynchronizedLyricsFrame(); + ~UnsynchronizedLyricsFrame() override; /*! * Returns the text of this unsynchronized lyrics frame. * * \see text() */ - virtual String toString() const; + String toString() const override; /*! * Returns the language encoding as a 3 byte encoding as specified by @@ -113,7 +113,7 @@ namespace TagLib { * * \see text() */ - virtual void setText(const String &s); + void setText(const String &s) override; /*! * Returns the text encoding that will be used in rendering this frame. @@ -145,7 +145,7 @@ namespace TagLib { * Note that currently the language() field is not supported by the PropertyMap * interface. */ - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * LyricsFrames each have a unique description. This searches for a lyrics @@ -159,8 +159,8 @@ namespace TagLib { protected: // Reimplementations. - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; private: /*! diff --git a/taglib/mpeg/id3v2/frames/urllinkframe.h b/taglib/mpeg/id3v2/frames/urllinkframe.h index 2026bc98..54fb49f7 100644 --- a/taglib/mpeg/id3v2/frames/urllinkframe.h +++ b/taglib/mpeg/id3v2/frames/urllinkframe.h @@ -53,7 +53,7 @@ namespace TagLib { /*! * Destroys this UrlLinkFrame instance. */ - virtual ~UrlLinkFrame(); + ~UrlLinkFrame() override; /*! * Returns the URL. @@ -67,13 +67,13 @@ namespace TagLib { // Reimplementations. - virtual void setText(const String &s); - virtual String toString() const; - virtual PropertyMap asProperties() const; + void setText(const String &s) override; + String toString() const override; + PropertyMap asProperties() const override; protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; /*! * The constructor used by the FrameFactory. @@ -117,11 +117,11 @@ namespace TagLib { /*! * Destroys this UserUrlLinkFrame instance. */ - virtual ~UserUrlLinkFrame(); + ~UserUrlLinkFrame() override; // Reimplementations. - virtual String toString() const; + String toString() const override; /*! * Returns the text encoding that will be used in rendering this frame. @@ -160,7 +160,7 @@ namespace TagLib { * characters), the returned map will contain an entry "WXXX/" * in its unsupportedData() list. */ - virtual PropertyMap asProperties() const; + PropertyMap asProperties() const override; /*! * Searches for the user defined url frame with the description \a description @@ -169,8 +169,8 @@ namespace TagLib { static UserUrlLinkFrame *find(Tag *tag, const String &description); protected: - virtual void parseFields(const ByteVector &data); - virtual ByteVector renderFields() const; + void parseFields(const ByteVector &data) override; + ByteVector renderFields() const override; /*! * The constructor used by the FrameFactory. diff --git a/taglib/mpeg/id3v2/id3v2tag.h b/taglib/mpeg/id3v2/id3v2tag.h index e8463503..a86a67c1 100644 --- a/taglib/mpeg/id3v2/id3v2tag.h +++ b/taglib/mpeg/id3v2/id3v2tag.h @@ -152,27 +152,27 @@ namespace TagLib { /*! * Destroys this Tag instance. */ - virtual ~Tag(); + ~Tag() override; // Reimplementations. - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &s); - virtual void setArtist(const String &s); - virtual void setAlbum(const String &s); - virtual void setComment(const String &s); - virtual void setGenre(const String &s); - virtual void setYear(unsigned int i); - virtual void setTrack(unsigned int i); + void setTitle(const String &s) override; + void setArtist(const String &s) override; + void setAlbum(const String &s) override; + void setComment(const String &s) override; + void setGenre(const String &s) override; + void setYear(unsigned int i) override; + void setTrack(unsigned int i) override; - virtual bool isEmpty() const; + bool isEmpty() const override; /*! * Returns a pointer to the tag's header. @@ -301,7 +301,7 @@ namespace TagLib { * once, the description, separated by a "/". * */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Removes unsupported frames given by \a properties. The elements of @@ -314,13 +314,13 @@ namespace TagLib { * - "UNKNOWN/" + frameID, for frames that could not be parsed by TagLib. * In that case, *all* unknown frames with the given ID will be removed. */ - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. * See the comments in properties(). */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Render the tag back to binary data, suitable to be written to disk. diff --git a/taglib/mpeg/mpegfile.cpp b/taglib/mpeg/mpegfile.cpp index ebc73985..91295776 100644 --- a/taglib/mpeg/mpegfile.cpp +++ b/taglib/mpeg/mpegfile.cpp @@ -89,9 +89,9 @@ namespace public: AdapterFile(IOStream *stream) : File(stream) {} - Tag *tag() const { return 0; } - AudioProperties *audioProperties() const { return 0; } - bool save() { return false; } + Tag *tag() const override { return 0; } + AudioProperties *audioProperties() const override { return 0; } + bool save() override { return false; } }; } // namespace diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h index 1f99c130..bdbfae0d 100644 --- a/taglib/mpeg/mpegfile.h +++ b/taglib/mpeg/mpegfile.h @@ -117,7 +117,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns a pointer to a tag that is the union of the ID3v2 and ID3v1 @@ -136,7 +136,7 @@ namespace TagLib { * \see ID3v2Tag() * \see APETag() */ - virtual Tag *tag() const; + Tag *tag() const override; /*! * Implements the reading part of the unified property interface. @@ -144,9 +144,9 @@ namespace TagLib { * first one (in the order ID3v2, APE, ID3v1) will be converted to the * PropertyMap. */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the writing part of the unified tag dictionary interface. @@ -156,13 +156,13 @@ namespace TagLib { * limitations of that format. * The returned PropertyMap refers to the ID3v2 tag only. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the MPEG::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. If at least one tag -- ID3v1 or ID3v2 -- exists this @@ -179,7 +179,7 @@ namespace TagLib { * * \see save(int tags) */ - virtual bool save(); + bool save() override; /*! * Save the file. This will attempt to save all of the tag types that are diff --git a/taglib/mpeg/mpegproperties.h b/taglib/mpeg/mpegproperties.h index 8e23c4a1..09064692 100644 --- a/taglib/mpeg/mpegproperties.h +++ b/taglib/mpeg/mpegproperties.h @@ -57,29 +57,29 @@ namespace TagLib { /*! * Destroys this MPEG Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns a pointer to the Xing/VBRI header if one exists or null if no diff --git a/taglib/ogg/flac/oggflacfile.h b/taglib/ogg/flac/oggflacfile.h index 0e5e1ac4..a6dcdf48 100644 --- a/taglib/ogg/flac/oggflacfile.h +++ b/taglib/ogg/flac/oggflacfile.h @@ -87,7 +87,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. This will always be a XiphComment. @@ -102,33 +102,33 @@ namespace TagLib { * * \see hasXiphComment() */ - virtual XiphComment *tag() const; + XiphComment *tag() const override; /*! * Returns the FLAC::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Implements the unified property interface -- export function. * This forwards directly to XiphComment::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified tag dictionary interface -- import function. * Like properties(), this is a forwarder to the file's XiphComment. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Save the file. This will primarily save and update the XiphComment. * Returns true if the save is successful. */ - virtual bool save(); + bool save() override; /*! * Returns the length of the audio-stream, used by FLAC::Properties for diff --git a/taglib/ogg/oggfile.h b/taglib/ogg/oggfile.h index a5d20c26..dee42d10 100644 --- a/taglib/ogg/oggfile.h +++ b/taglib/ogg/oggfile.h @@ -50,7 +50,7 @@ namespace TagLib { class TAGLIB_EXPORT File : public TagLib::File { public: - virtual ~File(); + ~File() override; /*! * Returns the packet contents for the i-th packet (starting from zero) @@ -78,7 +78,7 @@ namespace TagLib { */ const PageHeader *lastPageHeader(); - virtual bool save(); + bool save() override; protected: /*! diff --git a/taglib/ogg/opus/opusfile.h b/taglib/ogg/opus/opusfile.h index bc785144..77686556 100644 --- a/taglib/ogg/opus/opusfile.h +++ b/taglib/ogg/opus/opusfile.h @@ -79,39 +79,39 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the XiphComment for this file. XiphComment implements the tag * interface, so this serves as the reimplementation of * TagLib::File::tag(). */ - virtual Ogg::XiphComment *tag() const; + Ogg::XiphComment *tag() const override; /*! * Implements the unified property interface -- export function. * This forwards directly to XiphComment::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified tag dictionary interface -- import function. * Like properties(), this is a forwarder to the file's XiphComment. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the Opus::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Returns whether or not the given \a stream can be opened as an Opus diff --git a/taglib/ogg/opus/opusproperties.h b/taglib/ogg/opus/opusproperties.h index 106af2ac..88485b65 100644 --- a/taglib/ogg/opus/opusproperties.h +++ b/taglib/ogg/opus/opusproperties.h @@ -59,19 +59,19 @@ namespace TagLib { /*! * Destroys this Opus::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. @@ -79,12 +79,12 @@ namespace TagLib { * \note Always returns 48000, because Opus can decode any stream at a * sample rate of 8, 12, 16, 24, or 48 kHz, */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * The Opus codec supports decoding at multiple sample rates, there is no diff --git a/taglib/ogg/speex/speexfile.h b/taglib/ogg/speex/speexfile.h index f8c002ac..70f86097 100644 --- a/taglib/ogg/speex/speexfile.h +++ b/taglib/ogg/speex/speexfile.h @@ -79,39 +79,39 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the XiphComment for this file. XiphComment implements the tag * interface, so this serves as the reimplementation of * TagLib::File::tag(). */ - virtual Ogg::XiphComment *tag() const; + Ogg::XiphComment *tag() const override; /*! * Implements the unified property interface -- export function. * This forwards directly to XiphComment::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified tag dictionary interface -- import function. * Like properties(), this is a forwarder to the file's XiphComment. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the Speex::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Returns whether or not the given \a stream can be opened as a Speex diff --git a/taglib/ogg/speex/speexproperties.h b/taglib/ogg/speex/speexproperties.h index ada3de09..4a210839 100644 --- a/taglib/ogg/speex/speexproperties.h +++ b/taglib/ogg/speex/speexproperties.h @@ -59,19 +59,19 @@ namespace TagLib { /*! * Destroys this Speex::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the nominal bit rate as read from the Speex header in kb/s. @@ -81,12 +81,12 @@ namespace TagLib { /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the Speex version, currently "0" (as specified by the spec). diff --git a/taglib/ogg/vorbis/vorbisfile.h b/taglib/ogg/vorbis/vorbisfile.h index 70186ee5..d3426290 100644 --- a/taglib/ogg/vorbis/vorbisfile.h +++ b/taglib/ogg/vorbis/vorbisfile.h @@ -88,40 +88,40 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the XiphComment for this file. XiphComment implements the tag * interface, so this serves as the reimplementation of * TagLib::File::tag(). */ - virtual Ogg::XiphComment *tag() const; + Ogg::XiphComment *tag() const override; /*! * Implements the unified property interface -- export function. * This forwards directly to XiphComment::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified tag dictionary interface -- import function. * Like properties(), this is a forwarder to the file's XiphComment. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the Vorbis::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Save the file. * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Check if the given \a stream can be opened as an Ogg Vorbis file. diff --git a/taglib/ogg/vorbis/vorbisproperties.h b/taglib/ogg/vorbis/vorbisproperties.h index a57364b0..9e85bbc9 100644 --- a/taglib/ogg/vorbis/vorbisproperties.h +++ b/taglib/ogg/vorbis/vorbisproperties.h @@ -67,29 +67,29 @@ namespace TagLib { /*! * Destroys this VorbisProperties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the Vorbis version, currently "0" (as specified by the spec). diff --git a/taglib/ogg/xiphcomment.h b/taglib/ogg/xiphcomment.h index 79550a12..82e05b84 100644 --- a/taglib/ogg/xiphcomment.h +++ b/taglib/ogg/xiphcomment.h @@ -83,25 +83,25 @@ namespace TagLib { /*! * Destroys this instance of the XiphComment. */ - virtual ~XiphComment(); + ~XiphComment() override; - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &s); - virtual void setArtist(const String &s); - virtual void setAlbum(const String &s); - virtual void setComment(const String &s); - virtual void setGenre(const String &s); - virtual void setYear(unsigned int i); - virtual void setTrack(unsigned int i); + void setTitle(const String &s) override; + void setArtist(const String &s) override; + void setAlbum(const String &s) override; + void setComment(const String &s) override; + void setGenre(const String &s) override; + void setYear(unsigned int i) override; + void setTrack(unsigned int i) override; - virtual bool isEmpty() const; + bool isEmpty() const override; /*! * Returns the number of fields present in the comment. @@ -153,7 +153,7 @@ namespace TagLib { * comment is nothing more than a map from tag names to list of values, * as is the dict interface). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified property interface -- import function. @@ -162,7 +162,7 @@ namespace TagLib { * containing '=' or '~') in which case the according values will * be contained in the returned PropertyMap. */ - PropertyMap setProperties(const PropertyMap&); + PropertyMap setProperties(const PropertyMap&) override; /*! * Check if the given String is a valid Xiph comment key. diff --git a/taglib/riff/aiff/aifffile.h b/taglib/riff/aiff/aifffile.h index 1e2d9d54..b8f76182 100644 --- a/taglib/riff/aiff/aifffile.h +++ b/taglib/riff/aiff/aifffile.h @@ -81,7 +81,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. @@ -92,32 +92,32 @@ namespace TagLib { * * \see hasID3v2Tag() */ - virtual ID3v2::Tag *tag() const; + ID3v2::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * This method forwards to ID3v2::Tag::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. * This method forwards to ID3v2::Tag::setProperties(). */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the AIFF::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Saves the file. */ - virtual bool save(); + bool save() override; /*! * Save using a specific ID3v2 version (e.g. v3) diff --git a/taglib/riff/aiff/aiffproperties.h b/taglib/riff/aiff/aiffproperties.h index c4db7699..36774d0c 100644 --- a/taglib/riff/aiff/aiffproperties.h +++ b/taglib/riff/aiff/aiffproperties.h @@ -55,29 +55,29 @@ namespace TagLib { /*! * Destroys this AIFF::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/riff/rifffile.h b/taglib/riff/rifffile.h index 314dc4d9..9adbca0f 100644 --- a/taglib/riff/rifffile.h +++ b/taglib/riff/rifffile.h @@ -49,7 +49,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; protected: diff --git a/taglib/riff/wav/infotag.h b/taglib/riff/wav/infotag.h index 431d86cb..86317dd8 100644 --- a/taglib/riff/wav/infotag.h +++ b/taglib/riff/wav/infotag.h @@ -98,27 +98,27 @@ namespace TagLib { */ Tag(const ByteVector &data); - virtual ~Tag(); + ~Tag() override; // Reimplementations - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &s); - virtual void setArtist(const String &s); - virtual void setAlbum(const String &s); - virtual void setComment(const String &s); - virtual void setGenre(const String &s); - virtual void setYear(unsigned int i); - virtual void setTrack(unsigned int i); + void setTitle(const String &s) override; + void setArtist(const String &s) override; + void setAlbum(const String &s) override; + void setComment(const String &s) override; + void setGenre(const String &s) override; + void setYear(unsigned int i) override; + void setTrack(unsigned int i) override; - virtual bool isEmpty() const; + bool isEmpty() const override; /*! * Returns a copy of the internal fields of the tag. The returned map directly diff --git a/taglib/riff/wav/wavfile.h b/taglib/riff/wav/wavfile.h index 3538c796..6882d191 100644 --- a/taglib/riff/wav/wavfile.h +++ b/taglib/riff/wav/wavfile.h @@ -93,7 +93,7 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the ID3v2 Tag for this file. @@ -101,7 +101,7 @@ namespace TagLib { * \note This method does not return all the tags for this file for * backward compatibility. Will be fixed in TagLib 2.0. */ - ID3v2::Tag *tag() const; + ID3v2::Tag *tag() const override; /*! * Returns the ID3v2 Tag for this file. @@ -138,26 +138,26 @@ namespace TagLib { * Implements the unified property interface -- export function. * This method forwards to ID3v2::Tag::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. * This method forwards to ID3v2::Tag::setProperties(). */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the WAV::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Saves the file. */ - virtual bool save(); + bool save() override; /*! * Save the file. If \a strip is specified, it is possible to choose if diff --git a/taglib/riff/wav/wavproperties.h b/taglib/riff/wav/wavproperties.h index 65240885..339f8899 100644 --- a/taglib/riff/wav/wavproperties.h +++ b/taglib/riff/wav/wavproperties.h @@ -58,29 +58,29 @@ namespace TagLib { /*! * Destroys this WAV::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/s3m/s3mfile.h b/taglib/s3m/s3mfile.h index f9ff6058..c497a44d 100644 --- a/taglib/s3m/s3mfile.h +++ b/taglib/s3m/s3mfile.h @@ -67,27 +67,27 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; - Mod::Tag *tag() const; + Mod::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * Forwards to Mod::Tag::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified property interface -- import function. * Forwards to Mod::Tag::setProperties(). */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the S3M::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - S3M::Properties *audioProperties() const; + S3M::Properties *audioProperties() const override; /*! * Save the file. @@ -95,7 +95,7 @@ namespace TagLib { * * \note Saving ScreamTracker III tags is not supported. */ - bool save(); + bool save() override; private: File(const File &); diff --git a/taglib/s3m/s3mproperties.h b/taglib/s3m/s3mproperties.h index ec50a2d7..ade221ea 100644 --- a/taglib/s3m/s3mproperties.h +++ b/taglib/s3m/s3mproperties.h @@ -46,35 +46,35 @@ namespace TagLib { }; Properties(AudioProperties::ReadStyle propertiesStyle); - virtual ~Properties(); + ~Properties() override; - int channels() const; + int channels() const override; - unsigned short lengthInPatterns() const; - bool stereo() const; - unsigned short sampleCount() const; - unsigned short patternCount() const; - unsigned short flags() const; - unsigned short trackerVersion() const; + unsigned short lengthInPatterns() const; + bool stereo() const; + unsigned short sampleCount() const; + unsigned short patternCount() const; + unsigned short flags() const; + unsigned short trackerVersion() const; unsigned short fileFormatVersion() const; - unsigned char globalVolume() const; - unsigned char masterVolume() const; - unsigned char tempo() const; - unsigned char bpmSpeed() const; + unsigned char globalVolume() const; + unsigned char masterVolume() const; + unsigned char tempo() const; + unsigned char bpmSpeed() const; void setChannels(int channels); - void setLengthInPatterns (unsigned short lengthInPatterns); - void setStereo (bool stereo); - void setSampleCount (unsigned short sampleCount); - void setPatternCount (unsigned short patternCount); - void setFlags (unsigned short flags); - void setTrackerVersion (unsigned short trackerVersion); + void setLengthInPatterns(unsigned short lengthInPatterns); + void setStereo(bool stereo); + void setSampleCount(unsigned short sampleCount); + void setPatternCount(unsigned short patternCount); + void setFlags(unsigned short flags); + void setTrackerVersion(unsigned short trackerVersion); void setFileFormatVersion(unsigned short fileFormatVersion); - void setGlobalVolume (unsigned char globalVolume); - void setMasterVolume (unsigned char masterVolume); - void setTempo (unsigned char tempo); - void setBpmSpeed (unsigned char bpmSpeed); + void setGlobalVolume(unsigned char globalVolume); + void setMasterVolume(unsigned char masterVolume); + void setTempo(unsigned char tempo); + void setBpmSpeed(unsigned char bpmSpeed); private: Properties(const Properties&); diff --git a/taglib/tagunion.h b/taglib/tagunion.h index 95ae1e55..78fd2e29 100644 --- a/taglib/tagunion.h +++ b/taglib/tagunion.h @@ -49,32 +49,32 @@ namespace TagLib { */ TagUnion(Tag *first = 0, Tag *second = 0, Tag *third = 0); - virtual ~TagUnion(); + ~TagUnion() override; Tag *operator[](int index) const; Tag *tag(int index) const; void set(int index, Tag *tag); - virtual PropertyMap properties() const; - virtual void removeUnsupportedProperties(const StringList &unsupported); + PropertyMap properties() const override; + void removeUnsupportedProperties(const StringList &unsupported) override; - virtual String title() const; - virtual String artist() const; - virtual String album() const; - virtual String comment() const; - virtual String genre() const; - virtual unsigned int year() const; - virtual unsigned int track() const; + String title() const override; + String artist() const override; + String album() const override; + String comment() const override; + String genre() const override; + unsigned int year() const override; + unsigned int track() const override; - virtual void setTitle(const String &s); - virtual void setArtist(const String &s); - virtual void setAlbum(const String &s); - virtual void setComment(const String &s); - virtual void setGenre(const String &s); - virtual void setYear(unsigned int i); - virtual void setTrack(unsigned int i); - virtual bool isEmpty() const; + void setTitle(const String &s) override; + void setArtist(const String &s) override; + void setAlbum(const String &s) override; + void setComment(const String &s) override; + void setGenre(const String &s) override; + void setYear(unsigned int i) override; + void setTrack(unsigned int i) override; + bool isEmpty() const override; template T *access(int index, bool create) { diff --git a/taglib/toolkit/tbytevectorlist.h b/taglib/toolkit/tbytevectorlist.h index 54a21c68..1849b422 100644 --- a/taglib/toolkit/tbytevectorlist.h +++ b/taglib/toolkit/tbytevectorlist.h @@ -50,7 +50,7 @@ namespace TagLib { /*! * Destroys this ByteVectorList instance. */ - virtual ~ByteVectorList(); + ~ByteVectorList() override; /*! * Make a shallow, implicitly shared, copy of \a l. Because this is diff --git a/taglib/toolkit/tbytevectorstream.h b/taglib/toolkit/tbytevectorstream.h index 783f8b80..6d2f6453 100644 --- a/taglib/toolkit/tbytevectorstream.h +++ b/taglib/toolkit/tbytevectorstream.h @@ -51,17 +51,17 @@ namespace TagLib { /*! * Destroys this ByteVectorStream instance. */ - virtual ~ByteVectorStream(); + ~ByteVectorStream() override; /*! * Returns the file name in the local file system encoding. */ - FileName name() const; + FileName name() const override; /*! * Reads a block of size \a length at the current get pointer. */ - ByteVector readBlock(size_t length); + ByteVector readBlock(size_t length) override; /*! * Attempts to write the block \a data at the current get pointer. If the @@ -72,7 +72,7 @@ namespace TagLib { * for a ByteVector. And even this function is significantly slower than * doing output with a char[]. */ - void writeBlock(const ByteVector &data); + void writeBlock(const ByteVector &data) override; /*! * Insert \a data at position \a start in the file overwriting \a replace @@ -81,7 +81,7 @@ namespace TagLib { * \note This method is slow since it requires rewriting all of the file * after the insertion point. */ - void insert(const ByteVector &data, offset_t start = 0, size_t replace = 0); + void insert(const ByteVector &data, offset_t start = 0, size_t replace = 0) override; /*! * Removes a block of the file starting a \a start and continuing for @@ -90,18 +90,18 @@ namespace TagLib { * \note This method is slow since it involves rewriting all of the file * after the removed portion. */ - void removeBlock(offset_t start = 0, size_t length = 0); + void removeBlock(offset_t start = 0, size_t length = 0) override; /*! * Returns true if the file is read only (or if the file can not be opened). */ - bool readOnly() const; + bool readOnly() const override; /*! * Since the file can currently only be opened as an argument to the * constructor (sort-of by design), this returns if that open succeeded. */ - bool isOpen() const; + bool isOpen() const override; /*! * Move the I/O pointer to \a offset in the file from position \a p. This @@ -109,27 +109,27 @@ namespace TagLib { * * \see Position */ - void seek(offset_t offset, Position p = Beginning); + void seek(offset_t offset, Position p = Beginning) override; /*! * Reset the end-of-file and error flags on the file. */ - void clear(); + void clear() override; /*! * Returns the current offset within the file. */ - offset_t tell() const; + offset_t tell() const override; /*! * Returns the length of the file. */ - offset_t length(); + offset_t length() override; /*! * Truncates the file to a \a length. */ - void truncate(offset_t length); + void truncate(offset_t length) override; ByteVector *data(); diff --git a/taglib/toolkit/tdebuglistener.cpp b/taglib/toolkit/tdebuglistener.cpp index bf5c2608..bc89ab9e 100644 --- a/taglib/toolkit/tdebuglistener.cpp +++ b/taglib/toolkit/tdebuglistener.cpp @@ -39,7 +39,7 @@ namespace class DefaultListener : public DebugListener { public: - virtual void printMessage(const String &msg) + void printMessage(const String &msg) override { #ifdef _WIN32 diff --git a/taglib/toolkit/tfilestream.h b/taglib/toolkit/tfilestream.h index 7df16f2d..d4b7599c 100644 --- a/taglib/toolkit/tfilestream.h +++ b/taglib/toolkit/tfilestream.h @@ -62,17 +62,17 @@ namespace TagLib { /*! * Destroys this FileStream instance. */ - virtual ~FileStream(); + ~FileStream() override; /*! * Returns the file name in the local file system encoding. */ - FileName name() const; + FileName name() const override; /*! * Reads a block of size \a length at the current get pointer. */ - ByteVector readBlock(size_t length); + ByteVector readBlock(size_t length) override; /*! * Attempts to write the block \a data at the current get pointer. If the @@ -83,7 +83,7 @@ namespace TagLib { * for a ByteVector. And even this function is significantly slower than * doing output with a char[]. */ - void writeBlock(const ByteVector &data); + void writeBlock(const ByteVector &data) override; /*! * Insert \a data at position \a start in the file overwriting \a replace @@ -92,7 +92,7 @@ namespace TagLib { * \note This method is slow since it requires rewriting all of the file * after the insertion point. */ - void insert(const ByteVector &data, offset_t start = 0, size_t replace = 0); + void insert(const ByteVector &data, offset_t start = 0, size_t replace = 0) override; /*! * Removes a block of the file starting a \a start and continuing for @@ -101,18 +101,18 @@ namespace TagLib { * \note This method is slow since it involves rewriting all of the file * after the removed portion. */ - void removeBlock(offset_t start = 0, size_t length = 0); + void removeBlock(offset_t start = 0, size_t length = 0) override; /*! * Returns true if the file is read only (or if the file can not be opened). */ - bool readOnly() const; + bool readOnly() const override; /*! * Since the file can currently only be opened as an argument to the * constructor (sort-of by design), this returns if that open succeeded. */ - bool isOpen() const; + bool isOpen() const override; /*! * Move the I/O pointer to \a offset in the file from position \a p. This @@ -120,27 +120,27 @@ namespace TagLib { * * \see Position */ - void seek(offset_t offset, Position p = Beginning); + void seek(offset_t offset, Position p = Beginning) override; /*! * Reset the end-of-file and error flags on the file. */ - void clear(); + void clear() override; /*! * Returns the current offset within the file. */ - offset_t tell() const; + offset_t tell() const override; /*! * Returns the length of the file. */ - offset_t length(); + offset_t length() override; /*! * Truncates the file to a \a length. */ - void truncate(offset_t length); + void truncate(offset_t length) override; protected: diff --git a/taglib/toolkit/tlist.tcc b/taglib/toolkit/tlist.tcc index 4ab05afe..c204c2de 100644 --- a/taglib/toolkit/tlist.tcc +++ b/taglib/toolkit/tlist.tcc @@ -69,7 +69,7 @@ template class List::ListPrivate : public ListPrivateBase public: ListPrivate() : ListPrivateBase() {} ListPrivate(const std::list &l) : ListPrivateBase(), list(l) {} - ~ListPrivate() { + ~ListPrivate() override { clear(); } void clear() { diff --git a/taglib/toolkit/tpropertymap.h b/taglib/toolkit/tpropertymap.h index 92316422..36a94cd5 100644 --- a/taglib/toolkit/tpropertymap.h +++ b/taglib/toolkit/tpropertymap.h @@ -133,7 +133,7 @@ namespace TagLib { */ PropertyMap(const SimplePropertyMap &m); - virtual ~PropertyMap(); + ~PropertyMap() override; /*! * Inserts \a values under \a key in the map. If \a key already exists, diff --git a/taglib/toolkit/tstringlist.h b/taglib/toolkit/tstringlist.h index e18a54b1..a0b59676 100644 --- a/taglib/toolkit/tstringlist.h +++ b/taglib/toolkit/tstringlist.h @@ -74,7 +74,7 @@ namespace TagLib { /*! * Destroys this StringList instance. */ - virtual ~StringList(); + ~StringList() override; /*! * Concatenate the list of strings into one string separated by \a separator. diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h index bc613e93..b02f8457 100644 --- a/taglib/trueaudio/trueaudiofile.h +++ b/taglib/trueaudio/trueaudiofile.h @@ -131,39 +131,39 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. */ - virtual TagLib::Tag *tag() const; + TagLib::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * If the file contains both ID3v1 and v2 tags, only ID3v2 will be * converted to the PropertyMap. */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified property interface -- import function. * Creates in ID3v2 tag if necessary. If an ID3v1 tag exists, it will * be updated as well, within the limitations of ID3v1. */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Returns the TrueAudio::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Saves the file. */ - virtual bool save(); + bool save() override; /*! * Returns a pointer to the ID3v1 tag of the file. diff --git a/taglib/trueaudio/trueaudioproperties.h b/taglib/trueaudio/trueaudioproperties.h index 99123d00..ccb959f2 100644 --- a/taglib/trueaudio/trueaudioproperties.h +++ b/taglib/trueaudio/trueaudioproperties.h @@ -58,7 +58,7 @@ namespace TagLib { /*! * Destroys this TrueAudio::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in seconds. The length is rounded down to @@ -66,29 +66,29 @@ namespace TagLib { * * \see lengthInMilliseconds() */ - virtual int lengthInSeconds() const; + int lengthInSeconds() const override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/wavpack/wavpackfile.h b/taglib/wavpack/wavpackfile.h index ffece732..a1c87e97 100644 --- a/taglib/wavpack/wavpackfile.h +++ b/taglib/wavpack/wavpackfile.h @@ -101,42 +101,42 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; /*! * Returns the Tag for this file. This will be an APE tag, an ID3v1 tag * or a combination of the two. */ - virtual TagLib::Tag *tag() const; + TagLib::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * If the file contains both an APE and an ID3v1 tag, only APE * will be converted to the PropertyMap. */ - PropertyMap properties() const; + PropertyMap properties() const override; - void removeUnsupportedProperties(const StringList &properties); + void removeUnsupportedProperties(const StringList &properties) override; /*! * Implements the unified property interface -- import function. * Creates an APE tag if it does not exists and calls setProperties() on * that. Any existing ID3v1 tag will be updated as well. */ - PropertyMap setProperties(const PropertyMap&); + PropertyMap setProperties(const PropertyMap&) override; /*! * Returns the MPC::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - virtual Properties *audioProperties() const; + Properties *audioProperties() const override; /*! * Saves the file. * * This returns true if the save was successful. */ - virtual bool save(); + bool save() override; /*! * Returns a pointer to the ID3v1 tag of the file. diff --git a/taglib/wavpack/wavpackproperties.h b/taglib/wavpack/wavpackproperties.h index 86917923..c518803e 100644 --- a/taglib/wavpack/wavpackproperties.h +++ b/taglib/wavpack/wavpackproperties.h @@ -60,29 +60,29 @@ namespace TagLib { /*! * Destroys this WavPack::Properties instance. */ - virtual ~Properties(); + ~Properties() override; /*! * Returns the length of the file in milliseconds. * * \see lengthInSeconds() */ - virtual int lengthInMilliseconds() const; + int lengthInMilliseconds() const override; /*! * Returns the average bit rate of the file in kb/s. */ - virtual int bitrate() const; + int bitrate() const override; /*! * Returns the sample rate in Hz. 0 means unknown or custom. */ - virtual int sampleRate() const; + int sampleRate() const override; /*! * Returns the number of audio channels. */ - virtual int channels() const; + int channels() const override; /*! * Returns the number of bits per audio sample. diff --git a/taglib/xm/xmfile.cpp b/taglib/xm/xmfile.cpp index e5cd6156..961aaa23 100644 --- a/taglib/xm/xmfile.cpp +++ b/taglib/xm/xmfile.cpp @@ -93,14 +93,14 @@ public: { } - unsigned int read(TagLib::File &file, unsigned int limit) + unsigned int read(TagLib::File &file, unsigned int limit) override { unsigned int count = std::min(m_size, limit); file.seek(count, TagLib::File::Current); return count; } - unsigned int size() const + unsigned int size() const override { return m_size; } @@ -129,7 +129,7 @@ public: { } - unsigned int read(TagLib::File &file, unsigned int limit) + unsigned int read(TagLib::File &file, unsigned int limit) override { ByteVector data = file.readBlock(std::min(m_size, limit)); unsigned int count = data.size(); @@ -142,7 +142,7 @@ public: return count; } - unsigned int size() const + unsigned int size() const override { return m_size; } @@ -156,7 +156,7 @@ class ByteReader : public ValueReader public: ByteReader(unsigned char &byte) : ValueReader(byte) {} - unsigned int read(TagLib::File &file, unsigned int limit) + unsigned int read(TagLib::File &file, unsigned int limit) override { ByteVector data = file.readBlock(std::min(1U,limit)); if(data.size() > 0) { @@ -165,7 +165,7 @@ public: return data.size(); } - unsigned int size() const + unsigned int size() const override { return 1; } @@ -190,14 +190,14 @@ public: U16Reader(unsigned short &value, bool bigEndian) : NumberReader(value, bigEndian) {} - unsigned int read(TagLib::File &file, unsigned int limit) + unsigned int read(TagLib::File &file, unsigned int limit) override { ByteVector data = file.readBlock(std::min(2U,limit)); value = data.toUShort(bigEndian); return data.size(); } - unsigned int size() const + unsigned int size() const override { return 2; } @@ -211,14 +211,14 @@ public: { } - unsigned int read(TagLib::File &file, unsigned int limit) + unsigned int read(TagLib::File &file, unsigned int limit) override { ByteVector data = file.readBlock(std::min(4U,limit)); value = data.toUInt(bigEndian); return data.size(); } - unsigned int size() const + unsigned int size() const override { return 4; } @@ -320,7 +320,7 @@ public: return u32(number, true); } - unsigned int size() const + unsigned int size() const override { unsigned int size = 0; for(List::ConstIterator i = m_readers.begin(); @@ -330,7 +330,7 @@ public: return size; } - unsigned int read(TagLib::File &file, unsigned int limit) + unsigned int read(TagLib::File &file, unsigned int limit) override { unsigned int sumcount = 0; for(List::ConstIterator i = m_readers.begin(); diff --git a/taglib/xm/xmfile.h b/taglib/xm/xmfile.h index e72c92c4..d8cab22b 100644 --- a/taglib/xm/xmfile.h +++ b/taglib/xm/xmfile.h @@ -67,27 +67,27 @@ namespace TagLib { /*! * Destroys this instance of the File. */ - virtual ~File(); + ~File() override; - Mod::Tag *tag() const; + Mod::Tag *tag() const override; /*! * Implements the unified property interface -- export function. * Forwards to Mod::Tag::properties(). */ - PropertyMap properties() const; + PropertyMap properties() const override; /*! * Implements the unified property interface -- import function. * Forwards to Mod::Tag::setProperties(). */ - PropertyMap setProperties(const PropertyMap &); + PropertyMap setProperties(const PropertyMap &) override; /*! * Returns the XM::Properties for this file. If no audio properties * were read then this will return a null pointer. */ - XM::Properties *audioProperties() const; + XM::Properties *audioProperties() const override; /*! * Save the file. @@ -95,7 +95,7 @@ namespace TagLib { * * \note Saving Extended Module tags is not supported. */ - bool save(); + bool save() override; private: File(const File &); diff --git a/taglib/xm/xmproperties.h b/taglib/xm/xmproperties.h index 235820e5..3308f065 100644 --- a/taglib/xm/xmproperties.h +++ b/taglib/xm/xmproperties.h @@ -41,19 +41,19 @@ namespace TagLib { }; Properties(AudioProperties::ReadStyle propertiesStyle); - virtual ~Properties(); + ~Properties() override; - int channels() const; + int channels() const override; unsigned short lengthInPatterns() const; - unsigned short version() const; - unsigned short restartPosition() const; - unsigned short patternCount() const; - unsigned short instrumentCount() const; - unsigned int sampleCount() const; - unsigned short flags() const; - unsigned short tempo() const; - unsigned short bpmSpeed() const; + unsigned short version() const; + unsigned short restartPosition() const; + unsigned short patternCount() const; + unsigned short instrumentCount() const; + unsigned int sampleCount() const; + unsigned short flags() const; + unsigned short tempo() const; + unsigned short bpmSpeed() const; void setChannels(int channels); diff --git a/tests/plainfile.h b/tests/plainfile.h index b42475f9..3250816f 100644 --- a/tests/plainfile.h +++ b/tests/plainfile.h @@ -34,9 +34,9 @@ using namespace TagLib; class PlainFile : public File { public: explicit PlainFile(FileName name) : File(name) { } - Tag *tag() const { return NULL; } - AudioProperties *audioProperties() const { return NULL; } - bool save() { return false; } + Tag *tag() const override { return NULL; } + AudioProperties *audioProperties() const override { return NULL; } + bool save() override { return false; } void truncate(long length) { File::truncate(length); } ByteVector readAll() { diff --git a/tests/test_fileref.cpp b/tests/test_fileref.cpp index b2631827..2910803d 100644 --- a/tests/test_fileref.cpp +++ b/tests/test_fileref.cpp @@ -55,7 +55,7 @@ namespace class DummyResolver : public FileRef::FileTypeResolver { public: - virtual File *createFile(FileName fileName, bool, AudioProperties::ReadStyle) const + File *createFile(FileName fileName, bool, AudioProperties::ReadStyle) const override { return new Ogg::Vorbis::File(fileName); } @@ -64,12 +64,12 @@ namespace class DummyStreamResolver : public FileRef::StreamTypeResolver { public: - virtual File *createFile(FileName, bool, AudioProperties::ReadStyle) const + File *createFile(FileName, bool, AudioProperties::ReadStyle) const override { return 0; } - virtual File *createFileFromStream(IOStream *s, bool, AudioProperties::ReadStyle) const + File *createFileFromStream(IOStream *s, bool, AudioProperties::ReadStyle) const override { return new MP4::File(s); } diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp index 9de2596d..10a9afb8 100644 --- a/tests/test_id3v2.cpp +++ b/tests/test_id3v2.cpp @@ -62,9 +62,9 @@ class PublicFrame : public ID3v2::Frame String readStringField(const ByteVector &data, String::Type encoding, int *position = 0) { return ID3v2::Frame::readStringField(data, encoding, position); } - virtual String toString() const { return String(); } - virtual void parseFields(const ByteVector &) {} - virtual ByteVector renderFields() const { return ByteVector(); } + String toString() const override { return String(); } + void parseFields(const ByteVector &) override {} + ByteVector renderFields() const override { return ByteVector(); } }; class TestID3v2 : public CppUnit::TestFixture diff --git a/tests/test_riff.cpp b/tests/test_riff.cpp index dec6c553..4db2eb9b 100644 --- a/tests/test_riff.cpp +++ b/tests/test_riff.cpp @@ -51,9 +51,9 @@ public: void setChunkData(const ByteVector &name, const ByteVector &data) { RIFF::File::setChunkData(name, data); }; - virtual TagLib::Tag* tag() const { return 0; }; - virtual TagLib::AudioProperties* audioProperties() const { return 0;}; - virtual bool save() { return false; }; + TagLib::Tag* tag() const override { return 0; }; + TagLib::AudioProperties* audioProperties() const override { return 0;}; + bool save() override { return false; }; void removeChunk(unsigned int i) { RIFF::File::removeChunk(i); } void removeChunk(const ByteVector &name) { RIFF::File::removeChunk(name); } };