From 16b1f6fc50d79247000892fd88139b37e578a25d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Jul 2009 17:09:33 +0000 Subject: [PATCH] Removed critical section protecting last repeat counter. It is not needed any longer now that this is only used by wxLog::OnLogInMainThreade() which is only called from the main thread. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/log.h | 4 ---- src/common/log.cpp | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/include/wx/log.h b/include/wx/log.h index e3626ad634..b7b28a6fc5 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -580,10 +580,6 @@ protected: unsigned LogLastRepeatIfNeeded(); private: - // implement of LogLastRepeatIfNeeded(): it assumes that the - // caller had already locked GetPreviousLogCS() - unsigned LogLastRepeatIfNeededUnlocked(); - // called from OnLog() if it's called from the main thread and from Flush() // when it plays back the buffered messages logged from the other threads void OnLogInMainThread(wxLogLevel level, diff --git a/src/common/log.cpp b/src/common/log.cpp index 05f4cd676c..f72beb9af9 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -192,13 +192,6 @@ void wxSafeShowMessage(const wxString& title, const wxString& text) // ---------------------------------------------------------------------------- unsigned wxLog::LogLastRepeatIfNeeded() -{ - wxCRIT_SECT_LOCKER(lock, GetPreviousLogCS()); - - return LogLastRepeatIfNeededUnlocked(); -} - -unsigned wxLog::LogLastRepeatIfNeededUnlocked() { const unsigned count = gs_prevLog.numRepeated; @@ -312,7 +305,7 @@ wxLog::OnLogInMainThread(wxLogLevel level, return; } - LogLastRepeatIfNeededUnlocked(); + LogLastRepeatIfNeeded(); // reset repetition counter for a new message gs_prevLog.msg = msg; -- 2.47.2