clang-tidy: Use override keyword

run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-override' -fix
This commit is contained in:
Urs Fleisch
2023-07-15 15:54:03 +02:00
parent e20a53afbb
commit 9867bc947e
82 changed files with 587 additions and 587 deletions

View File

@@ -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<unsigned char>
public:
ByteReader(unsigned char &byte) : ValueReader<unsigned char>(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<unsigned short>(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<Reader*>::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<Reader*>::ConstIterator i = m_readers.begin();

View File

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

View File

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