Remove unnecessary check from DoNativeBeforeUpdate()
Don't test if we're using the native task dialog in this function because it is only called if we are, so simplify the code by omitting this check.
This commit is contained in:
@@ -511,8 +511,6 @@ bool wxProgressDialog::Pulse(const wxString& newmsg, bool *skip)
|
|||||||
bool wxProgressDialog::DoNativeBeforeUpdate(bool *skip)
|
bool wxProgressDialog::DoNativeBeforeUpdate(bool *skip)
|
||||||
{
|
{
|
||||||
#ifdef wxHAS_MSW_TASKDIALOG
|
#ifdef wxHAS_MSW_TASKDIALOG
|
||||||
if ( HasNativeTaskDialog() )
|
|
||||||
{
|
|
||||||
wxCriticalSectionLocker locker(m_sharedData->m_cs);
|
wxCriticalSectionLocker locker(m_sharedData->m_cs);
|
||||||
|
|
||||||
if ( m_sharedData->m_skipped )
|
if ( m_sharedData->m_skipped )
|
||||||
@@ -529,13 +527,12 @@ bool wxProgressDialog::DoNativeBeforeUpdate(bool *skip)
|
|||||||
m_timeStop = m_sharedData->m_timeStop;
|
m_timeStop = m_sharedData->m_timeStop;
|
||||||
|
|
||||||
return m_sharedData->m_state != Canceled;
|
return m_sharedData->m_state != Canceled;
|
||||||
}
|
#else // !wxHAS_MSW_TASKDIALOG
|
||||||
#endif // wxHAS_MSW_TASKDIALOG
|
|
||||||
|
|
||||||
wxUnusedVar(skip);
|
wxUnusedVar(skip);
|
||||||
wxFAIL_MSG( "unreachable" );
|
wxFAIL_MSG( "unreachable" );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
#endif // wxHAS_MSW_TASKDIALOG/!wxHAS_MSW_TASKDIALOG
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxProgressDialog::Resume()
|
void wxProgressDialog::Resume()
|
||||||
|
|||||||
Reference in New Issue
Block a user