diff --git a/src/openrct2/audio/AudioMixer.cpp b/src/openrct2/audio/AudioMixer.cpp index a62da013ec..d0b06e7dd4 100644 --- a/src/openrct2/audio/AudioMixer.cpp +++ b/src/openrct2/audio/AudioMixer.cpp @@ -68,7 +68,7 @@ public: } }; -class AudioMixer : public IAudioMixer +class AudioMixer final : public IAudioMixer { private: IAudioSource * _nullSource = nullptr; diff --git a/src/openrct2/audio/FileAudioSource.cpp b/src/openrct2/audio/FileAudioSource.cpp index c1d730b42e..5441fe063f 100644 --- a/src/openrct2/audio/FileAudioSource.cpp +++ b/src/openrct2/audio/FileAudioSource.cpp @@ -34,7 +34,7 @@ * An audio source where raw PCM data is streamed directly from * a file. */ -class FileAudioSource : public IAudioSource +class FileAudioSource final : public IAudioSource { private: AudioFormat _format = { 0 }; diff --git a/src/openrct2/audio/MemoryAudioSource.cpp b/src/openrct2/audio/MemoryAudioSource.cpp index ad358149a5..0c80304adb 100644 --- a/src/openrct2/audio/MemoryAudioSource.cpp +++ b/src/openrct2/audio/MemoryAudioSource.cpp @@ -37,7 +37,7 @@ * An audio source where raw PCM data is initially loaded into RAM from * a file and then streamed. */ -class MemoryAudioSource : public IAudioSource +class MemoryAudioSource final : public IAudioSource { private: AudioFormat _format = { 0 }; diff --git a/src/openrct2/core/Zip.cpp b/src/openrct2/core/Zip.cpp index 9dad0b72a4..98a5f9252b 100644 --- a/src/openrct2/core/Zip.cpp +++ b/src/openrct2/core/Zip.cpp @@ -18,7 +18,7 @@ #include "IStream.hpp" #include "Zip.h" -class ZipArchive : public IZipArchive +class ZipArchive final : public IZipArchive { private: zip_t * _zip; diff --git a/src/openrct2/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2/drawing/engines/opengl/OpenGLDrawingEngine.cpp index fbddc2e795..0055bc03ad 100644 --- a/src/openrct2/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -172,7 +172,7 @@ static const vec3f TransparentColourTable[144 - 44] = class OpenGLDrawingEngine; -class OpenGLDrawingContext : public IDrawingContext +class OpenGLDrawingContext final : public IDrawingContext { private: OpenGLDrawingEngine * _engine; diff --git a/src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.h b/src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.h index 9231a6a105..308ef7888d 100644 --- a/src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.h +++ b/src/openrct2/drawing/engines/opengl/OpenGLShaderProgram.h @@ -19,7 +19,7 @@ #include "../../../common.h" #include "OpenGLAPI.h" -class OpenGLShader +class OpenGLShader final { private: static constexpr uint64 MaxSourceSize = 8 * 1024 * 1024; // 8 MiB @@ -29,7 +29,7 @@ private: public: OpenGLShader(const char * name, GLenum type); - virtual ~OpenGLShader(); + ~OpenGLShader(); GLuint GetShaderId(); diff --git a/src/openrct2/network/TcpSocket.cpp b/src/openrct2/network/TcpSocket.cpp index 2b8a6ebdf5..7b6e9ed00e 100644 --- a/src/openrct2/network/TcpSocket.cpp +++ b/src/openrct2/network/TcpSocket.cpp @@ -81,7 +81,7 @@ struct ConnectRequest uint16 Port; }; -class TcpSocket : public ITcpSocket +class TcpSocket final : public ITcpSocket { private: SOCKET_STATUS _status = SOCKET_STATUS_CLOSED; diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 6474b2dc39..2f585c31a9 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -78,7 +78,7 @@ public: virtual void DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const { } - virtual uint8 GetObjectType() const { return _objectEntry.flags & 0x0F; } + virtual uint8 GetObjectType() const final { return _objectEntry.flags & 0x0F; } virtual const utf8 * GetName() const; virtual void SetRepositoryItem(ObjectRepositoryItem * item) const { } diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index ebe208dd4d..c5f5706efc 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -33,7 +33,7 @@ extern "C" #include "../object_list.h" } -class ObjectManager : public IObjectManager +class ObjectManager final : public IObjectManager { private: IObjectRepository * _objectRepository; diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index 209cf20a08..bdc8a90a9e 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -92,7 +92,7 @@ using ObjectEntryMap = std::unordered_map _items; @@ -107,7 +107,7 @@ public: _env = env; } - ~ObjectRepository() + ~ObjectRepository() final { ClearItems(); } @@ -160,7 +160,7 @@ public: return nullptr; } - const ObjectRepositoryItem * FindObject(const rct_object_entry * objectEntry) const override + const ObjectRepositoryItem * FindObject(const rct_object_entry * objectEntry) const override final { auto kvp = _itemMap.find(*objectEntry); if (kvp != _itemMap.end()) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index bb9dcf63ff..0ae593e0fd 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -87,7 +87,7 @@ public: } }; -class S4Importer : public IS4Importer +class S4Importer final : public IS4Importer { private: const utf8 * _s4Path; diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index 992894a400..5c9ceb8f99 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -63,7 +63,7 @@ enum TRACK_REPO_ITEM_FLAGS TRIF_READ_ONLY = (1 << 0), }; -class TrackDesignRepository : public ITrackDesignRepository +class TrackDesignRepository final : public ITrackDesignRepository { private: static constexpr const utf8 * TD_FILE_PATTERN = "*.td4;*.td6"; @@ -81,7 +81,7 @@ public: _env = env; } - virtual ~TrackDesignRepository() + virtual ~TrackDesignRepository() final { } diff --git a/src/openrct2/title/TitleSequencePlayer.cpp b/src/openrct2/title/TitleSequencePlayer.cpp index eddb8751ef..9043c6a82b 100644 --- a/src/openrct2/title/TitleSequencePlayer.cpp +++ b/src/openrct2/title/TitleSequencePlayer.cpp @@ -35,7 +35,7 @@ extern "C" #include "../world/scenery.h" } -class TitleSequencePlayer : public ITitleSequencePlayer +class TitleSequencePlayer final : public ITitleSequencePlayer { private: uint32 _sequenceId = 0;