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
This commit is contained in:
@@ -580,10 +580,6 @@ protected:
|
|||||||
unsigned LogLastRepeatIfNeeded();
|
unsigned LogLastRepeatIfNeeded();
|
||||||
|
|
||||||
private:
|
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()
|
// 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
|
// when it plays back the buffered messages logged from the other threads
|
||||||
void OnLogInMainThread(wxLogLevel level,
|
void OnLogInMainThread(wxLogLevel level,
|
||||||
|
@@ -192,13 +192,6 @@ void wxSafeShowMessage(const wxString& title, const wxString& text)
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
unsigned wxLog::LogLastRepeatIfNeeded()
|
unsigned wxLog::LogLastRepeatIfNeeded()
|
||||||
{
|
|
||||||
wxCRIT_SECT_LOCKER(lock, GetPreviousLogCS());
|
|
||||||
|
|
||||||
return LogLastRepeatIfNeededUnlocked();
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned wxLog::LogLastRepeatIfNeededUnlocked()
|
|
||||||
{
|
{
|
||||||
const unsigned count = gs_prevLog.numRepeated;
|
const unsigned count = gs_prevLog.numRepeated;
|
||||||
|
|
||||||
@@ -312,7 +305,7 @@ wxLog::OnLogInMainThread(wxLogLevel level,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogLastRepeatIfNeededUnlocked();
|
LogLastRepeatIfNeeded();
|
||||||
|
|
||||||
// reset repetition counter for a new message
|
// reset repetition counter for a new message
|
||||||
gs_prevLog.msg = msg;
|
gs_prevLog.msg = msg;
|
||||||
|
Reference in New Issue
Block a user