Make GCC suggest final, override keywords

This commit is contained in:
Michał Janiszewski 2017-01-13 11:31:15 +01:00
parent 7d7285cdaa
commit 411d1fff18
3 changed files with 7 additions and 4 deletions

View File

@ -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")

View File

@ -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[] =
{

View File

@ -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();