X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..b129eaa3772fc5c73e6e95cd94010a828ebf42c3:/src/osx/carbon/thread.cpp diff --git a/src/osx/carbon/thread.cpp b/src/osx/carbon/thread.cpp index 2cabb70b5f..db0a03d9b7 100644 --- a/src/osx/carbon/thread.cpp +++ b/src/osx/carbon/thread.cpp @@ -940,7 +940,7 @@ wxThreadError wxThread::Resume() // exiting thread // ----------------------------------------------------------------------------- -wxThread::ExitCode wxThread::Wait() +wxThread::ExitCode wxThread::Wait(wxThreadWait WXUNUSED(waitMode)) { wxCHECK_MSG( This() != this, (ExitCode)-1, wxT("a thread can't wait for itself") ); @@ -953,7 +953,7 @@ wxThread::ExitCode wxThread::Wait() return m_internal->GetExitCode(); } -wxThreadError wxThread::Delete(ExitCode *rc) +wxThreadError wxThread::Delete(ExitCode *rc, wxThreadWait WXUNUSED(waitMode)) { wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR, wxT("a thread can't delete itself") ); @@ -1128,14 +1128,14 @@ void wxThread::SetPriority(unsigned int prio) unsigned int wxThread::GetPriority() const { - wxCriticalSectionLocker lock((wxCriticalSection &)m_critsect); // const_cast + wxCriticalSectionLocker lock(const_cast(m_critsect)); return m_internal->GetPriority(); } unsigned long wxThread::GetId() const { - wxCriticalSectionLocker lock((wxCriticalSection &)m_critsect); // const_cast + wxCriticalSectionLocker lock(const_cast(m_critsect)); return (unsigned long)m_internal->GetId(); } @@ -1229,12 +1229,10 @@ void wxThreadModule::OnExit() } gs_critsectGui->Leave(); - delete gs_critsectGui; - gs_critsectGui = NULL; + wxDELETE(gs_critsectGui); } - delete gs_critsectWaitingForGui; - gs_critsectWaitingForGui = NULL; + wxDELETE(gs_critsectWaitingForGui); } // ----------------------------------------------------------------------------