X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c526007a8909e8856a6d1fb656c5150738d2e4a..824fd93d761e1e697be19a4ca582c5259e12c8ea:/src/common/event.cpp?ds=sidebyside diff --git a/src/common/event.cpp b/src/common/event.cpp index 678d31d3cc..8492fd3ec0 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -338,7 +338,7 @@ int wxNewEventType() // ---------------------------------------------------------------------------- /* - * General wxWindows events, covering + * General wxWidgets events, covering * all interesting things that might happen (button clicking, resizing, * setting text in widgets, etc.). * @@ -417,23 +417,23 @@ bool wxUpdateUIEvent::CanUpdate(wxWindowBase *win) if (sm_updateInterval == -1) return false; - else if (sm_updateInterval == 0) + + if (sm_updateInterval == 0) return true; - else - { + #if wxUSE_STOPWATCH && wxUSE_LONGLONG - wxLongLong now = wxGetLocalTimeMillis(); - if (now > (sm_lastUpdate + sm_updateInterval)) - { - return true; - } -#else - // If we don't have wxStopWatch or wxLongLong, we - // should err on the safe side and update now anyway. + wxLongLong now = wxGetLocalTimeMillis(); + if (now > (sm_lastUpdate + sm_updateInterval)) + { return true; -#endif } + return false; +#else + // If we don't have wxStopWatch or wxLongLong, we + // should err on the safe side and update now anyway. + return true; +#endif } // Reset the update time to provide a delay until the next @@ -1095,9 +1095,11 @@ void wxEvtHandler::AddPendingEvent(wxEvent& event) void wxEvtHandler::ProcessPendingEvents() { - // DE: It doesn't look like this method was intended to be called unless - // pending events have already been created. - wxASSERT_MSG(m_pendingEvents,wxT("Please call wxApp::ProcessPendingEvents() instead")); + // this method is only called by wxApp if this handler does have pending + // events + wxCHECK_RET( m_pendingEvents, + wxT("Please call wxApp::ProcessPendingEvents() instead") ); + #if defined(__VISAGECPP__) wxENTER_CRIT_SECT( m_eventsLocker); #else