From 3eeefdf9bdc41618a14a8fff96a016004b030e95 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Nov 2007 21:49:26 +0000 Subject: [PATCH] suppress (harmless) gcc warning about non-virtual dtor in a class with virtual functions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textentry.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index e3afd0eae0..65fbc3031f 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -140,6 +140,13 @@ public: } private: + // dtor doesn't have to be virtual as we're only ever deleted from our own + // Release() and are not meant to be derived form anyhow, but making it + // virtual silences gcc warnings; making it private makes it impossible to + // (mistakenly) delete us directly instead of calling Release() + virtual ~wxIEnumString() { } + + const wxArrayString m_strings; unsigned m_index; -- 2.45.2