From: Włodzimierz Skiba Date: Thu, 26 Jan 2006 19:35:32 +0000 (+0000) Subject: Blind fixes for warnings in wxTinderbox. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/23ff76d5ad99605e0e49173dcd61894b17b03c9a Blind fixes for warnings in wxTinderbox. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/univ/combobox.h b/include/wx/univ/combobox.h index 3e4eff22db..4e87c1c6ee 100644 --- a/include/wx/univ/combobox.h +++ b/include/wx/univ/combobox.h @@ -66,6 +66,7 @@ class WXDLLEXPORT wxComboPopup { public: wxComboPopup(wxComboControl *combo) { m_combo = combo; } + virtual ~wxComboPopup() {} // we must have an associated control which is subclassed by the combobox virtual wxControl *GetControl() = 0; diff --git a/include/wx/univ/inpcons.h b/include/wx/univ/inpcons.h index 381497a89d..28f6b7ee52 100644 --- a/include/wx/univ/inpcons.h +++ b/include/wx/univ/inpcons.h @@ -31,7 +31,7 @@ typedef wxString wxControlAction; #define wxACTION_NONE _T("") // no action to perform // ---------------------------------------------------------------------------- -// wxInputConsumer: mix-in class for handling wxControlActions (used by +// wxInputConsumer: mix-in class for handling wxControlActions (used by // wxControl and wxTopLevelWindow). // ---------------------------------------------------------------------------- @@ -39,6 +39,7 @@ class WXDLLEXPORT wxInputConsumer { public: wxInputConsumer() { m_inputHandler = NULL; } + virtual ~wxInputConsumer() {} // get the input handler wxInputHandler *GetInputHandler() const { return m_inputHandler; } @@ -98,18 +99,18 @@ private: EVT_SET_FOCUS(classname::OnFocus) \ EVT_KILL_FOCUS(classname::OnFocus) \ EVT_ACTIVATE(classname::OnActivate) - + // Forward event handlers to wxInputConsumer // -// (We can't use them directly, because wxIC has virtual methods, which forces -// the compiler to include (at least) two vtables into wxControl, one for the -// wxWindow-wxControlBase-wxControl branch and one for the wxIC mix-in. -// Consequently, the "this" pointer has different value when in wxControl's -// and wxIC's method, even though the instance stays same. This doesn't matter -// so far as member pointers aren't used, but that's not wxControl's case. -// When we add an event table entry (= use a member pointer) pointing to -// wxIC's OnXXX method, GCC compiles code that executes wxIC::OnXXX with the -// version of "this" that belongs to wxControl, not wxIC! In our particular +// (We can't use them directly, because wxIC has virtual methods, which forces +// the compiler to include (at least) two vtables into wxControl, one for the +// wxWindow-wxControlBase-wxControl branch and one for the wxIC mix-in. +// Consequently, the "this" pointer has different value when in wxControl's +// and wxIC's method, even though the instance stays same. This doesn't matter +// so far as member pointers aren't used, but that's not wxControl's case. +// When we add an event table entry (= use a member pointer) pointing to +// wxIC's OnXXX method, GCC compiles code that executes wxIC::OnXXX with the +// version of "this" that belongs to wxControl, not wxIC! In our particular // case, the effect is that m_handler is NULL (probably same memory // area as the_other_vtable's_this->m_refObj) and input handling doesn't work.) #define WX_FORWARD_TO_INPUT_CONSUMER(classname) \ diff --git a/include/wx/univ/scrarrow.h b/include/wx/univ/scrarrow.h index 841db25ef5..57cc4df70a 100644 --- a/include/wx/univ/scrarrow.h +++ b/include/wx/univ/scrarrow.h @@ -81,6 +81,8 @@ private: class WXDLLEXPORT wxControlWithArrows { public: + virtual ~wxControlWithArrows() {} + // get the renderer to use for drawing the arrows virtual wxRenderer *GetRenderer() const = 0; diff --git a/include/wx/univ/scrthumb.h b/include/wx/univ/scrthumb.h index 48bbd563be..78f91b0c26 100644 --- a/include/wx/univ/scrthumb.h +++ b/include/wx/univ/scrthumb.h @@ -86,6 +86,8 @@ private: class WXDLLEXPORT wxControlWithThumb { public: + virtual ~wxControlWithThumb() {} + // simple accessors // ----------------