From cc11ded1ae65fb38d6ff7a5483c6c27ea3471bfa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 26 Nov 2005 13:08:09 +0000 Subject: [PATCH] made wxTreeTraversal and wxIDropSources dtors virtual (patch 1311828) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/ole/dropsrc.cpp | 3 ++- src/msw/treectrl.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/ole/dropsrc.cpp b/src/msw/ole/dropsrc.cpp index cda175f054..7b66b0c350 100644 --- a/src/msw/ole/dropsrc.cpp +++ b/src/msw/ole/dropsrc.cpp @@ -53,6 +53,7 @@ class wxIDropSource : public IDropSource { public: wxIDropSource(wxDropSource *pDropSource); + virtual ~wxIDropSource() { } DECLARE_IUNKNOWN_METHODS; @@ -64,7 +65,7 @@ private: DWORD m_grfInitKeyState; // button which started the d&d operation wxDropSource *m_pDropSource; // pointer to C++ class we belong to - DECLARE_NO_COPY_CLASS(wxIDropSource) + DECLARE_NO_COPY_CLASS(wxIDropSource) }; // ============================================================================ diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index e0a4d592b3..40f9f53105 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -311,6 +311,11 @@ public: m_tree = tree; } + // give it a virtual dtor: not really needed as the class is never used + // polymorphically and not even allocated on heap at all, but this is safer + // (in case it ever is) and silences the compiler warnings for now + virtual ~wxTreeTraversal() { } + // do traverse the tree: visit all items (recursively by default) under the // given one; return true if all items were traversed or false if the // traversal was aborted because OnVisit returned false -- 2.45.2