1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +01:00

Replace virtual with override wherever possible; eliminate needless virtual...

... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
This commit is contained in:
Paul Licameli
2016-02-24 01:06:47 -05:00
parent 74121c1494
commit 990080ae7d
169 changed files with 1652 additions and 1639 deletions

View File

@@ -62,26 +62,26 @@ class PROFILE_DLL_API SimpleBlockFile /* not final */ : public BlockFile {
// Reading
/// Read the summary section of the disk file
virtual bool ReadSummary(void *data);
bool ReadSummary(void *data) override;
/// Read the data section of the disk file
virtual int ReadData(samplePtr data, sampleFormat format,
sampleCount start, sampleCount len);
int ReadData(samplePtr data, sampleFormat format,
sampleCount start, sampleCount len) override;
/// Create a NEW block file identical to this one
virtual BlockFile *Copy(wxFileName newFileName);
BlockFile *Copy(wxFileName newFileName) override;
/// Write an XML representation of this file
virtual void SaveXML(XMLWriter &xmlFile);
void SaveXML(XMLWriter &xmlFile) override;
virtual wxLongLong GetSpaceUsage();
virtual void Recover();
wxLongLong GetSpaceUsage() override;
void Recover() override;
static BlockFile *BuildFromXML(DirManager &dm, const wxChar **attrs);
virtual bool GetNeedWriteCacheToDisk();
virtual void WriteCacheToDisk();
bool GetNeedWriteCacheToDisk() override;
void WriteCacheToDisk() override;
virtual bool GetNeedFillCache() { return !mCache.active; }
virtual void FillCache();
bool GetNeedFillCache() override { return !mCache.active; }
void FillCache() override;
protected: