From: Vadim Zeitlin <vadim@wxwidgets.org> Date: Fri, 2 Nov 2007 13:27:38 +0000 (+0000) Subject: fix warnings in EventsSuppressor ctor from gcc with -O option X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3b49331b7441e091fc5997b830801d76a1243f28 fix warnings in EventsSuppressor ctor from gcc with -O option git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/textentry.h b/include/wx/textentry.h index 9ebbdeb5bc..d8482d42f0 100644 --- a/include/wx/textentry.h +++ b/include/wx/textentry.h @@ -125,13 +125,11 @@ protected: { public: EventsSuppressor(wxTextEntryBase *text, bool suppress = true) + : m_text(text), + m_suppress(suppress) { - m_suppress = suppress; if ( m_suppress ) - { - m_text = text; m_text->SuppressTextChangedEvents(); - } } ~EventsSuppressor() @@ -144,6 +142,7 @@ protected: wxTextEntryBase *m_text; bool m_suppress; }; + friend class EventsSuppressor; // return true if the events are currently not suppressed