OpenToonz - An open-source full-featured 2D animation creation software
C
Add missing `override` specifier
Michał Janiszewskid37dbb57f291
diff --git a/toonz/sources/include/tfx.h b/toonz/sources/include/tfx.hindex 975786259..7ac2511a9 100644--- a/toonz/sources/include/tfx.h+++ b/toonz/sources/include/tfx.h@@ -541,7 +541,7 @@ inline std::string TFx::getFxType() const { return getDeclaration()->getId(); }#define FX_DECLARATION(T) \\public: \- const TPersistDeclaration *getDeclaration() const;+ const TPersistDeclaration *getDeclaration() const override;#define FX_IDENTIFIER(T, I) \namespace { \diff --git a/toonz/sources/include/toonz/ttileset.h b/toonz/sources/include/toonz/ttileset.hindex 3e2fcbb21..cd41387a2 100644--- a/toonz/sources/include/toonz/ttileset.h+++ b/toonz/sources/include/toonz/ttileset.h@@ -83,15 +83,9 @@ public:Tile();Tile(const TRasterCM32P &ras, const TPoint &p);~Tile();-#ifdef __LP64__- QString id() const {- return "TileCM" + QString::number((unsigned long)this);- }-#elseQString id() const override {- return "TileCM" + QString::number((UINT)this);+ return "TileCM" + QString::number((uintptr_t)this);}-#endifTile *clone() const override;@@ -129,15 +123,9 @@ public:Tile();Tile(const TRasterP &ras, const TPoint &p);~Tile();-#ifdef __LP64__- QString id() const {- return "TTileSet32::Tile" + QString::number((unsigned long)this);- }-#elseQString id() const override {- return "TTileSet32::Tile" + QString::number((UINT)this);+ return "TTileSet32::Tile" + QString::number((uintptr_t)this);}-#endifTile *clone() const override;diff --git a/toonz/sources/include/toonz/txshmeshcolumn.h b/toonz/sources/include/toonz/txshmeshcolumn.hindex 7b8ac1e5e..7560d83fa 100644--- a/toonz/sources/include/toonz/txshmeshcolumn.h+++ b/toonz/sources/include/toonz/txshmeshcolumn.h@@ -25,15 +25,15 @@ class DVAPI TXshMeshColumn : public TXshCellColumn {public:TXshMeshColumn();- TXshColumn::ColumnType getColumnType() const { return eMeshType; }- TXshMeshColumn *getMeshColumn() { return this; }+ TXshColumn::ColumnType getColumnType() const override { return eMeshType; }+ TXshMeshColumn *getMeshColumn() override { return this; }- TXshColumn *clone() const;+ TXshColumn *clone() const override;- bool canSetCell(const TXshCell &cell) const;+ bool canSetCell(const TXshCell &cell) const override;- void loadData(TIStream &is);- void saveData(TOStream &is);+ void loadData(TIStream &is) override;+ void saveData(TOStream &is) override;private:// Not copiablediff --git a/toonz/sources/include/toonz/txshpalettecolumn.h b/toonz/sources/include/toonz/txshpalettecolumn.hindex 0e1e935a5..0925e7aee 100644--- a/toonz/sources/include/toonz/txshpalettecolumn.h+++ b/toonz/sources/include/toonz/txshpalettecolumn.h@@ -35,20 +35,20 @@ public:TXshPaletteColumn();~TXshPaletteColumn();- TXshColumn::ColumnType getColumnType() const;+ TXshColumn::ColumnType getColumnType() const override;- TXshPaletteColumn *getPaletteColumn() { return this; }+ TXshPaletteColumn *getPaletteColumn() override { return this; }- TXshColumn *clone() const;+ TXshColumn *clone() const override;TPaletteColumnFx *getPaletteColumnFx() const { return m_fx; }- TFx *getFx() const;+ TFx *getFx() const override;void setFx(TFx *fx);- bool canSetCell(const TXshCell &cell) const;+ bool canSetCell(const TXshCell &cell) const override;- void loadData(TIStream &is);- void saveData(TOStream &is);+ void loadData(TIStream &is) override;+ void saveData(TOStream &is) override;private:// not implementeddiff --git a/toonz/sources/include/toonz/txshpalettelevel.h b/toonz/sources/include/toonz/txshpalettelevel.hindex 8dc3b3107..74321afee 100644--- a/toonz/sources/include/toonz/txshpalettelevel.h+++ b/toonz/sources/include/toonz/txshpalettelevel.h@@ -54,7 +54,7 @@ Destroys the TXshPaletteLevel object./*!Return the \b TXshPaletteLevel level (overridden from TXshLevel)*/- TXshPaletteLevel *getPaletteLevel() { return this; }+ TXshPaletteLevel *getPaletteLevel() override { return this; }/*!Return the \b TPalette@@ -72,7 +72,7 @@ Set the level palette to \b palette.Return level path.\sa setPath()*/- TFilePath getPath() const { return m_path; }+ TFilePath getPath() const override { return m_path; }/*!Set level path.@@ -82,13 +82,13 @@ Set level path.//! Returns the frame count. It depends on the palette animation://! for a not-animated palette getFrameCount() == 1- int getFrameCount() const;+ int getFrameCount() const override;- void loadData(TIStream &is);- void saveData(TOStream &os);+ void loadData(TIStream &is) override;+ void saveData(TOStream &os) override;- void load();- void save();+ void load() override;+ void save() override;void save(const TFilePath &fp);//! note gets the contentHistory. can be 0diff --git a/toonz/sources/include/tpersist.h b/toonz/sources/include/tpersist.hindex 024520c76..698191c1b 100644--- a/toonz/sources/include/tpersist.h+++ b/toonz/sources/include/tpersist.h@@ -147,7 +147,7 @@ private: \static TPersistDeclarationT<T> m_declaration; \\public: \- const TPersistDeclaration *getDeclaration() const { return &m_declaration; }+ const TPersistDeclaration *getDeclaration() const override { return &m_declaration; }#define PERSIST_IDENTIFIER(T, I) TPersistDeclarationT<T> T::m_declaration(I);diff --git a/toonz/sources/include/tsound_t.h b/toonz/sources/include/tsound_t.hindex 435a4e285..81f431e19 100644--- a/toonz/sources/include/tsound_t.h+++ b/toonz/sources/include/tsound_t.h@@ -138,7 +138,7 @@ from which it's created.It hasn't reference to the object.//! Applies a trasformation (echo, reverb, ect) to the object and returns the//! transformed soundtrack#if defined(MACOSX) || defined(LINUX)- TSoundTrackP apply(TSoundTransform *transform);+ TSoundTrackP apply(TSoundTransform *transform) override;#else // _WIN32TSoundTrackP apply(TSoundTransform *transform) override {assert(transform);diff --git a/toonz/sources/stdfx/colorembossfx.cpp b/toonz/sources/stdfx/colorembossfx.cppindex 4c8d46892..01c3fb911 100644--- a/toonz/sources/stdfx/colorembossfx.cpp+++ b/toonz/sources/stdfx/colorembossfx.cpp@@ -34,7 +34,7 @@ public:~ColorEmbossFx(){};- bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info) {+ bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info) override {if (m_input.isConnected()) {bool ret = m_input->doGetBBox(frame, bBox, info);return ret;@@ -46,12 +46,12 @@ public:void transform(double frame, int port, const TRectD &rectOnOutput,const TRenderSettings &infoOnOutput, TRectD &rectOnInput,- TRenderSettings &infoOnInput);+ TRenderSettings &infoOnInput) override;int getMemoryRequirement(const TRectD &rect, double frame,- const TRenderSettings &info);- void doCompute(TTile &tile, double frame, const TRenderSettings &ri);- bool canHandle(const TRenderSettings &info, double frame) {+ const TRenderSettings &info) override;+ void doCompute(TTile &tile, double frame, const TRenderSettings &ri) override;+ bool canHandle(const TRenderSettings &info, double frame) override {return (isAlmostIsotropic(info.m_affine));}};diff --git a/toonz/sources/stdfx/stdfx.h b/toonz/sources/stdfx/stdfx.hindex b4de9f32e..1518c22de 100644--- a/toonz/sources/stdfx/stdfx.h+++ b/toonz/sources/stdfx/stdfx.h@@ -17,7 +17,7 @@ static const std::string PLUGIN_PREFIX("STD");#define FX_PLUGIN_DECLARATION(T) \\public: \- const TPersistDeclaration *getDeclaration() const;+ const TPersistDeclaration *getDeclaration() const override;#ifdef _WIN32