diff --git a/CMakeLists.txt b/CMakeLists.txt index 3873711b2e..de2e5d8c93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,9 @@ endif (DISABLE_TTF) ADD_CHECK_C_COMPILER_FLAG(CMAKE_C_FLAGS C_WARN_WRITE_STRINGS -Wno-error=date-time) ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_WRITE_STRINGS -Wno-error=date-time) ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_TYPES -Wsuggest-final-types) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_FINAL_METHODS -Wsuggest-final-methods) +ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_SUGGEST_OVERRIDE -Wsuggest-override) if (FORCE32) set(TARGET_M "-m32") diff --git a/src/openrct2/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2/drawing/engines/SoftwareDrawingEngine.cpp index 8e72bc32c1..4a016c0801 100644 --- a/src/openrct2/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2/drawing/engines/SoftwareDrawingEngine.cpp @@ -81,7 +81,7 @@ public: _screenDPI = dpi; } - void Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 xStart, sint32 yStart) + void Draw(sint32 x, sint32 y, sint32 width, sint32 height, sint32 xStart, sint32 yStart) override { static const uint8 RainPattern[] = { diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index d51217a342..bb9dcf63ff 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -118,7 +118,7 @@ private: uint8 _researchRideTypeUsed[128]; public: - void LoadSavedGame(const utf8 * path) + void LoadSavedGame(const utf8 * path) override { if (!rct1_read_sv4(path, &_s4)) { @@ -127,7 +127,7 @@ public: _s4Path = path; } - void LoadScenario(const utf8 * path) + void LoadScenario(const utf8 * path) override { if (!rct1_read_sc4(path, &_s4)) { @@ -136,7 +136,7 @@ public: _s4Path = path; } - void Import() + void Import() override { Initialise();