Merge pull request #1140 from AbigailBuccaneer/Wsuggest-override
Compile with -Wsuggest-override under GCC1008-fix
commit
6289ea91b1
|
@ -134,6 +134,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||||
|
|
||||||
set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Werror -Wold-style-cast -pedantic-errors")
|
set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Werror -Wold-style-cast -pedantic-errors")
|
||||||
set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958
|
set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958
|
||||||
|
|
||||||
|
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||||
|
set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wsuggest-override")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(RELEASE_CXX_FLAGS "-O2")
|
set(RELEASE_CXX_FLAGS "-O2")
|
||||||
set(DEBUG_CXX_FLAGS "-g -O0")
|
set(DEBUG_CXX_FLAGS "-g -O0")
|
||||||
set(TEST_CXX_FLAGS "-pthread")
|
set(TEST_CXX_FLAGS "-pthread")
|
||||||
|
|
|
@ -51,14 +51,6 @@ CAutoKid::~CAutoKid()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destroys the object.
|
|
||||||
|
|
||||||
void CAutoKid::DeleteObject(bool all)
|
|
||||||
{
|
|
||||||
CAuto::DeleteObject(all);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Initialize the object.
|
// Initialize the object.
|
||||||
|
|
||||||
void CAutoKid::Init()
|
void CAutoKid::Init()
|
||||||
|
@ -197,11 +189,3 @@ bool CAutoKid::EventProcess(const Event &event)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Returns an error due the state of the automation.
|
|
||||||
|
|
||||||
Error CAutoKid::GetError()
|
|
||||||
{
|
|
||||||
return ERR_OK;
|
|
||||||
}
|
|
||||||
|
|
|
@ -27,13 +27,10 @@ class CAutoKid : public CAuto
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAutoKid(COldObject* object);
|
CAutoKid(COldObject* object);
|
||||||
~CAutoKid();
|
~CAutoKid() override;
|
||||||
|
|
||||||
void DeleteObject(bool all = false);
|
void Init() override;
|
||||||
|
bool EventProcess(const Event &event) override;
|
||||||
void Init();
|
|
||||||
bool EventProcess(const Event &event);
|
|
||||||
Error GetError();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_speed = 0.0f;
|
float m_speed = 0.0f;
|
||||||
|
|
|
@ -96,7 +96,7 @@ class CForegroundTask : public CTask
|
||||||
public:
|
public:
|
||||||
CForegroundTask(COldObject* object) : CTask(object) {}
|
CForegroundTask(COldObject* object) : CTask(object) {}
|
||||||
|
|
||||||
bool IsBackground() final { return false; }
|
bool IsBackground() override final { return false; }
|
||||||
bool IsPilot() override { return false; }
|
bool IsPilot() override { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,6 +105,6 @@ class CBackgroundTask : public CTask
|
||||||
public:
|
public:
|
||||||
CBackgroundTask(COldObject* object) : CTask(object) {}
|
CBackgroundTask(COldObject* object) : CTask(object) {}
|
||||||
|
|
||||||
bool IsBackground() final { return true; }
|
bool IsBackground() override final { return true; }
|
||||||
bool IsPilot() final { return true; }
|
bool IsPilot() override final { return true; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -3106,7 +3106,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~CBotFileColobot()
|
~CBotFileColobot() override
|
||||||
{
|
{
|
||||||
if (Opened())
|
if (Opened())
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,12 +27,12 @@ using namespace CBot;
|
||||||
class CBotTokenUT : public testing::Test
|
class CBotTokenUT : public testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void SetUp()
|
CBotTokenUT()
|
||||||
{
|
{
|
||||||
CBotProgram::Init();
|
CBotProgram::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown()
|
~CBotTokenUT()
|
||||||
{
|
{
|
||||||
CBotProgram::Free();
|
CBotProgram::Free();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,14 +27,14 @@ using namespace CBot;
|
||||||
class CBotUT : public testing::Test
|
class CBotUT : public testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void SetUp()
|
CBotUT()
|
||||||
{
|
{
|
||||||
CBotProgram::Init();
|
CBotProgram::Init();
|
||||||
CBotProgram::AddFunction("FAIL", rFail, cFail);
|
CBotProgram::AddFunction("FAIL", rFail, cFail);
|
||||||
CBotProgram::AddFunction("ASSERT", rAssert, cAssert);
|
CBotProgram::AddFunction("ASSERT", rAssert, cAssert);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TearDown()
|
~CBotUT()
|
||||||
{
|
{
|
||||||
CBotProgram::Free();
|
CBotProgram::Free();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue