Fix C5204 warnings by adding default virtual destructors

pull/578/head
Andrei Kortunov 5 years ago
parent 4c5d2feee8
commit 2e7712a390

@ -34,6 +34,8 @@ namespace MWGui
/// right edge. The second integer is the height of all /// right edge. The second integer is the height of all
/// text combined prior to pagination. /// text combined prior to pagination.
virtual std::pair <unsigned int, unsigned int> getSize () const = 0; virtual std::pair <unsigned int, unsigned int> getSize () const = 0;
virtual ~TypesetBook() = default;
}; };
struct GlyphInfo struct GlyphInfo
@ -87,8 +89,7 @@ namespace MWGui
typedef uint8_t const * Utf8Point; typedef uint8_t const * Utf8Point;
typedef std::pair <Utf8Point, Utf8Point> Utf8Span; typedef std::pair <Utf8Point, Utf8Point> Utf8Span;
virtual ~BookTypesetter() = default;
enum Alignment { enum Alignment {
AlignLeft = -1, AlignLeft = -1,

@ -39,6 +39,8 @@ namespace MWGui
/// and end of the span relative to the body, and a valid topic ID if /// and end of the span relative to the body, and a valid topic ID if
/// the span represents a keyword, or zero if not. /// the span represents a keyword, or zero if not.
virtual void visitSpans (std::function <void (TopicId, size_t, size_t)> visitor) const = 0; virtual void visitSpans (std::function <void (TopicId, size_t, size_t)> visitor) const = 0;
virtual ~Entry() = default;
}; };
/// An interface to topic data. /// An interface to topic data.
@ -47,6 +49,8 @@ namespace MWGui
/// Returns a pre-formatted span of UTF8 encoded text representing /// Returns a pre-formatted span of UTF8 encoded text representing
/// the name of the NPC this portion of dialog was heard from. /// the name of the NPC this portion of dialog was heard from.
virtual Utf8Span source () const = 0; virtual Utf8Span source () const = 0;
virtual ~TopicEntry() = default;
}; };
/// An interface to journal data. /// An interface to journal data.
@ -55,8 +59,9 @@ namespace MWGui
/// Returns a pre-formatted span of UTF8 encoded text representing /// Returns a pre-formatted span of UTF8 encoded text representing
/// the in-game date this entry was added to the journal. /// the in-game date this entry was added to the journal.
virtual Utf8Span timestamp () const = 0; virtual Utf8Span timestamp () const = 0;
};
virtual ~JournalEntry() = default;
};
/// called prior to journal opening /// called prior to journal opening
virtual void load () = 0; virtual void load () = 0;
@ -85,6 +90,8 @@ namespace MWGui
// create an instance of the default journal view model implementation // create an instance of the default journal view model implementation
static Ptr create (); static Ptr create ();
virtual ~JournalViewModel() = default;
}; };
} }

@ -81,6 +81,7 @@ namespace MWGui
void onFrame(float dt); void onFrame(float dt);
virtual void setAlpha(float alpha); virtual void setAlpha(float alpha);
virtual ~NoDrop() = default;
private: private:
MyGUI::Widget* mWidget; MyGUI::Widget* mWidget;

@ -149,6 +149,8 @@ public:
public: public:
virtual void handleTextKey(const std::string &groupname, const std::multimap<float, std::string>::const_iterator &key, virtual void handleTextKey(const std::string &groupname, const std::multimap<float, std::string>::const_iterator &key,
const std::multimap<float, std::string>& map) = 0; const std::multimap<float, std::string>& map) = 0;
virtual ~TextKeyListener() = default;
}; };
void setTextKeyListener(TextKeyListener* listener); void setTextKeyListener(TextKeyListener* listener);

@ -40,6 +40,8 @@ namespace MWWorld
return true; return true;
} }
virtual ~ListModelsVisitor() = default;
std::vector<std::string>& mOut; std::vector<std::string>& mOut;
}; };

@ -382,6 +382,7 @@ namespace MWWorld
public: public:
///@note must return nullptr if the cell is not found ///@note must return nullptr if the cell is not found
virtual CellStore* getCellStore(const ESM::CellId& cellId) = 0; virtual CellStore* getCellStore(const ESM::CellId& cellId) = 0;
virtual ~GetCellStoreCallback() = default;
}; };
/// @param callback to use for retrieving of additional CellStore objects by ID (required for resolving moved references) /// @param callback to use for retrieving of additional CellStore objects by ID (required for resolving moved references)

@ -43,6 +43,7 @@ namespace MWWorld
public: public:
virtual void itemAdded(const ConstPtr& item, int count) {} virtual void itemAdded(const ConstPtr& item, int count) {}
virtual void itemRemoved(const ConstPtr& item, int count) {} virtual void itemRemoved(const ConstPtr& item, int count) {}
virtual ~ContainerStoreListener() = default;
}; };
class ContainerStore class ContainerStore

@ -34,6 +34,7 @@ namespace MWWorld
*/ */
virtual void permanentEffectAdded (const ESM::MagicEffect *magicEffect, bool isNew) {} virtual void permanentEffectAdded (const ESM::MagicEffect *magicEffect, bool isNew) {}
virtual ~InventoryStoreListener() = default;
}; };
///< \brief Variant of the ContainerStore for NPCs ///< \brief Variant of the ContainerStore for NPCs

@ -38,6 +38,8 @@ namespace Debug
virtual std::streamsize write(const char *str, std::streamsize size); virtual std::streamsize write(const char *str, std::streamsize size);
virtual ~DebugOutputBase() = default;
protected: protected:
static Level getLevelMarker(const char *str); static Level getLevelMarker(const char *str);

@ -118,6 +118,8 @@ namespace DetourNavigator
public: public:
KeyView() = default; KeyView() = default;
virtual ~KeyView() = default;
KeyView(const std::string& value) KeyView(const std::string& value)
: mValue(&value) {} : mValue(&value) {}
@ -161,6 +163,8 @@ namespace DetourNavigator
return compare(other.getValue()) < 0; return compare(other.getValue()) < 0;
} }
virtual ~RecastMeshKeyView() = default;
private: private:
std::reference_wrapper<const RecastMesh> mRecastMesh; std::reference_wrapper<const RecastMesh> mRecastMesh;
std::reference_wrapper<const std::vector<OffMeshConnection>> mOffMeshConnections; std::reference_wrapper<const std::vector<OffMeshConnection>> mOffMeshConnections;

@ -29,6 +29,8 @@ namespace Loading
virtual void setProgress (size_t value) {} virtual void setProgress (size_t value) {}
/// Increase current progress, default by 1. /// Increase current progress, default by 1.
virtual void increaseProgress (size_t increase = 1) {} virtual void increaseProgress (size_t increase = 1) {}
virtual ~Listener() = default;
}; };
/// @brief Used for stopping a loading sequence when the object goes out of scope /// @brief Used for stopping a loading sequence when the object goes out of scope

@ -33,6 +33,8 @@ namespace Gui
virtual MyGUI::IntSize getRequestedSize() = 0; virtual MyGUI::IntSize getRequestedSize() = 0;
virtual ~AutoSizedWidget() = default;
protected: protected:
void notifySizeChange(MyGUI::Widget* w); void notifySizeChange(MyGUI::Widget* w);
@ -94,6 +96,8 @@ namespace Gui
public: public:
Box(); Box();
virtual ~Box() = default;
void notifyChildrenSizeChanged(); void notifyChildrenSizeChanged();
protected: protected:

@ -38,9 +38,11 @@ namespace ICS
{ {
public: public:
virtual void channelChanged(Channel* channel, float currentValue, float previousValue) = 0; virtual void channelChanged(Channel* channel, float currentValue, float previousValue) = 0;
virtual ~ChannelListener() = default;
}; };
} }
#endif #endif

@ -38,9 +38,11 @@ namespace ICS
{ {
public: public:
virtual void controlChanged(Control* control, float currentValue, float previousValue) = 0; virtual void controlChanged(Control* control, float currentValue, float previousValue) = 0;
virtual ~ControlListener() = default;
}; };
} }
#endif #endif

@ -45,6 +45,8 @@ namespace ICS
{ {
public: public:
virtual void logMessage(const char* text) = 0; virtual void logMessage(const char* text) = 0;
virtual ~InputControlSystemLog() = default;
}; };
class DllExport InputControlSystem class DllExport InputControlSystem
@ -262,6 +264,8 @@ namespace ICS
InputControlSystem::MouseWheelClick click, InputControlSystem::MouseWheelClick click,
Control::ControlChangingDirection direction); Control::ControlChangingDirection direction);
virtual ~DetectingBindingListener() = default;
/* OPENMW CODE ENDS HERE /* OPENMW CODE ENDS HERE
* ------------------------------------------------------------------------------------- */ * ------------------------------------------------------------------------------------- */
}; };

Loading…
Cancel
Save