Merge pull request #2741 from akortunov/warnfix

Fix C5204 warnings by adding default virtual destructors
pull/578/head
Roman Siromakha 5 years ago committed by GitHub
commit 3bd2c114a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -704,6 +704,7 @@ if (WIN32)
# caused by boost
4191 # 'type cast' : unsafe conversion (1.56, thread_primitives.hpp, normally off)
4643 # Forward declaring 'X' in namespace std is not permitted by the C++ Standard. (in *_std_fwd.h files)
5204 # Class has virtual functions, but its trivial destructor is not virtual
# caused by MyGUI
4275 # non dll-interface class 'std::exception' used as base for dll-interface class 'MyGUI::Exception'

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

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

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

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

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

@ -382,6 +382,7 @@ namespace MWWorld
public:
///@note must return nullptr if the cell is not found
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)

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

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

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

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

@ -29,6 +29,8 @@ namespace Loading
virtual void setProgress (size_t value) {}
/// Increase current progress, default by 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

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

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

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

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

Loading…
Cancel
Save