From ea41cce5ef604b3ac26f06d073bc23376bd7e7e3 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 23 Dec 2021 23:19:53 +1000 Subject: [PATCH] GS: Add missing override specifier to a few files --- pcsx2/GS/Renderers/Null/GSRendererNull.h | 6 +++--- pcsx2/GS/Renderers/Null/GSTextureNull.h | 10 +++++----- pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h | 2 +- pcsx2/GS/Renderers/SW/GSTextureSW.h | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pcsx2/GS/Renderers/Null/GSRendererNull.h b/pcsx2/GS/Renderers/Null/GSRendererNull.h index 2169cc0d2d..d2eae9c957 100644 --- a/pcsx2/GS/Renderers/Null/GSRendererNull.h +++ b/pcsx2/GS/Renderers/Null/GSRendererNull.h @@ -17,7 +17,7 @@ #include "GS/Renderers/Common/GSRenderer.h" -class GSRendererNull : public GSRenderer +class GSRendererNull final : public GSRenderer { class GSVertexTraceNull : public GSVertexTrace { @@ -29,11 +29,11 @@ class GSRendererNull : public GSRenderer }; protected: - void Draw() + void Draw() override { } - GSTexture* GetOutput(int i, int& y_offset) + GSTexture* GetOutput(int i, int& y_offset) override { return NULL; } diff --git a/pcsx2/GS/Renderers/Null/GSTextureNull.h b/pcsx2/GS/Renderers/Null/GSTextureNull.h index 407dbcd9b8..2ad202962c 100644 --- a/pcsx2/GS/Renderers/Null/GSTextureNull.h +++ b/pcsx2/GS/Renderers/Null/GSTextureNull.h @@ -17,7 +17,7 @@ #include "GS/Renderers/Common/GSTexture.h" -class GSTextureNull : public GSTexture +class GSTextureNull final : public GSTexture { struct { @@ -33,8 +33,8 @@ public: Type GetType() const { return m_desc.type; } Format GetFormat() const { return m_desc.format; } - bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) { return true; } - bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) { return false; } - void Unmap() {} - bool Save(const std::string& fn) { return false; } + bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) override { return true; } + bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) override { return false; } + void Unmap() override {} + bool Save(const std::string& fn) override { return false; } }; diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h index 8dae40c492..23faa68c04 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.h @@ -83,5 +83,5 @@ public: void CommitPages(const GSVector2i& region, bool commit) final; - u32 GetMemUsage(); + u32 GetMemUsage() final; }; diff --git a/pcsx2/GS/Renderers/SW/GSTextureSW.h b/pcsx2/GS/Renderers/SW/GSTextureSW.h index 0908103e01..96d4ecd008 100644 --- a/pcsx2/GS/Renderers/SW/GSTextureSW.h +++ b/pcsx2/GS/Renderers/SW/GSTextureSW.h @@ -27,10 +27,10 @@ class GSTextureSW final : public GSTexture public: GSTextureSW(Type type, int width, int height); - virtual ~GSTextureSW(); + ~GSTextureSW() override; - bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0); - bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0); - void Unmap(); - bool Save(const std::string& fn); + bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) override; + bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) override; + void Unmap() override; + bool Save(const std::string& fn) override; };