Remove state assigning from wxProgressDialog::GetHandle()

This was added in 01bd848eb9 without any
explanation and probably was a copy-and-paste typo as it just doesn't
make any sense to change the state of the dialog in this accessor
function (and if the state doesn't change, then this assignment is just
completely useless).

Remove the apparently unnecessary assignment and also an unnecessary
temporary variable.
This commit is contained in:
Vadim Zeitlin
2017-10-28 01:26:42 +02:00
parent 3b4a71c4dc
commit 25d9faca17

View File

@@ -576,13 +576,8 @@ WXWidget wxProgressDialog::GetHandle() const
#ifdef wxHAS_MSW_TASKDIALOG
if ( HasNativeTaskDialog() )
{
HWND hwnd;
{
wxCriticalSectionLocker locker(m_sharedData->m_cs);
m_sharedData->m_state = m_state;
hwnd = m_sharedData->m_hwnd;
}
return hwnd;
wxCriticalSectionLocker locker(m_sharedData->m_cs);
return m_sharedData->m_hwnd;
}
#endif
return wxGenericProgressDialog::GetHandle();