Removed critical section protecting last repeat counter.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Jul 2009 17:09:33 +0000 (17:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Jul 2009 17:09:33 +0000 (17:09 +0000)
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
src/common/log.cpp

index e3626ad6342eef42d5e3b8adbe406729909be330..b7b28a6fc5b1c289067882ea054702f3c74956f9 100644 (file)
@@ -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,
index 05f4cd676ce752493639d2311d6e65d7161e6054..f72beb9af9e4d5005594d5faa034f7519abcbb53 100644 (file)
@@ -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;