]> git.saurik.com Git - wxWidgets.git/commitdiff
fix warnings in EventsSuppressor ctor from gcc with -O option
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 2 Nov 2007 13:27:38 +0000 (13:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 2 Nov 2007 13:27:38 +0000 (13:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/textentry.h

index 9ebbdeb5bcc136a040c6344d9898f608abac22fd..d8482d42f066db3c6f981406b3ca4f7c90a48984 100644 (file)
@@ -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