mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 02:36:41 +00:00
Fix -Wnon-virtual-dtor warnings
This commit is contained in:
parent
a8a3ff9548
commit
c79c14da91
8 changed files with 15 additions and 8 deletions
|
@ -594,7 +594,7 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
set(OPENMW_CXX_FLAGS "-Wall -Wextra -Wundef -Wextra-semi -Wno-unused-parameter -pedantic -Wno-long-long ${OPENMW_CXX_FLAGS}")
|
set(OPENMW_CXX_FLAGS "-Wall -Wextra -Wundef -Wextra-semi -Wno-unused-parameter -pedantic -Wno-long-long -Wnon-virtual-dtor ${OPENMW_CXX_FLAGS}")
|
||||||
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -15,6 +15,8 @@ namespace MWGui
|
||||||
class StatsListener
|
class StatsListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~StatsListener() = default;
|
||||||
|
|
||||||
/// Set value for the given ID.
|
/// Set value for the given ID.
|
||||||
virtual void setValue(std::string_view id, const MWMechanics::AttributeValue& value) {}
|
virtual void setValue(std::string_view id, const MWMechanics::AttributeValue& value) {}
|
||||||
virtual void setValue(std::string_view id, const MWMechanics::DynamicStat<float>& value) {}
|
virtual void setValue(std::string_view id, const MWMechanics::DynamicStat<float>& value) {}
|
||||||
|
|
|
@ -21,6 +21,8 @@ namespace MWPhysics
|
||||||
class RayCastingInterface
|
class RayCastingInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~RayCastingInterface() = default;
|
||||||
|
|
||||||
/// Get distance from \a point to the collision shape of \a target. Uses a raycast to find where the
|
/// Get distance from \a point to the collision shape of \a target. Uses a raycast to find where the
|
||||||
/// target vector hits the collision shape and then calculates distance from the intersection point.
|
/// target vector hits the collision shape and then calculates distance from the intersection point.
|
||||||
/// This can be used to find out how much nearer we need to move to the target for a "getHitContact" to be
|
/// This can be used to find out how much nearer we need to move to the target for a "getHitContact" to be
|
||||||
|
|
|
@ -56,9 +56,8 @@ namespace ESM
|
||||||
|
|
||||||
virtual void save(ESMWriter& esm, bool inInventory = false) const;
|
virtual void save(ESMWriter& esm, bool inInventory = false) const;
|
||||||
|
|
||||||
virtual /// Initialize to default state
|
/// Initialize to default state
|
||||||
void
|
virtual void blank();
|
||||||
blank();
|
|
||||||
|
|
||||||
virtual ~ObjectState();
|
virtual ~ObjectState();
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,8 @@ namespace ESM4
|
||||||
Texture mTextures[4]; // 0 = bottom left, 1 = bottom right, 2 = top left, 3 = top right
|
Texture mTextures[4]; // 0 = bottom left, 1 = bottom right, 2 = top left, 3 = top right
|
||||||
std::vector<FormId> mIds; // land texture (LTEX) formids
|
std::vector<FormId> mIds; // land texture (LTEX) formids
|
||||||
|
|
||||||
virtual void load(Reader& reader);
|
void load(Reader& reader);
|
||||||
// virtual void save(Writer& writer) const;
|
// void save(Writer& writer) const;
|
||||||
|
|
||||||
// void blank();
|
// void blank();
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,8 +51,8 @@ namespace ESM4
|
||||||
std::string mEditorId;
|
std::string mEditorId;
|
||||||
Dimension mDimension;
|
Dimension mDimension;
|
||||||
|
|
||||||
virtual void load(Reader& reader);
|
void load(Reader& reader);
|
||||||
// virtual void save(Writer& writer) const;
|
// void save(Writer& writer) const;
|
||||||
|
|
||||||
// void blank();
|
// void blank();
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace LuaUtil
|
||||||
class Listener
|
class Listener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~Listener() = default;
|
||||||
virtual void valueChanged(
|
virtual void valueChanged(
|
||||||
std::string_view section, std::string_view key, const sol::object& value) const = 0;
|
std::string_view section, std::string_view key, const sol::object& value) const = 0;
|
||||||
virtual void sectionReplaced(std::string_view section, const sol::optional<sol::table>& values) const = 0;
|
virtual void sectionReplaced(std::string_view section, const sol::optional<sol::table>& values) const = 0;
|
||||||
|
|
|
@ -22,6 +22,9 @@ namespace LuaUi
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WidgetExtension();
|
WidgetExtension();
|
||||||
|
|
||||||
|
virtual ~WidgetExtension() = default;
|
||||||
|
|
||||||
// must be called after creating the underlying MyGUI::Widget
|
// must be called after creating the underlying MyGUI::Widget
|
||||||
void initialize(lua_State* lua, MyGUI::Widget* self);
|
void initialize(lua_State* lua, MyGUI::Widget* self);
|
||||||
// must be called after before destroying the underlying MyGUI::Widget
|
// must be called after before destroying the underlying MyGUI::Widget
|
||||||
|
|
Loading…
Reference in a new issue