From 3b49331b7441e091fc5997b830801d76a1243f28 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 2 Nov 2007 13:27:38 +0000 Subject: [PATCH] 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 --- include/wx/textentry.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.45.2