From ed086ea044385887e47acdef9d9983a89205e5c6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 31 Oct 2017 17:21:28 +0100 Subject: [PATCH] Get rid of unnecessary variables in wxMSW wxProgressDialog There doesn't seem to be any need to have both "foo" and "realFoo", just reuse the existing variables instead. No real changes. --- src/msw/progdlg.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/msw/progdlg.cpp b/src/msw/progdlg.cpp index 9d222beec1..44916657f9 100644 --- a/src/msw/progdlg.cpp +++ b/src/msw/progdlg.cpp @@ -987,14 +987,12 @@ void wxProgressDialog::UpdateExpandedInformation(int value) unsigned long remainingTime; UpdateTimeEstimates(value, elapsedTime, estimatedTime, remainingTime); - int realEstimatedTime = estimatedTime, - realRemainingTime = remainingTime; if ( m_sharedData->m_progressBarMarquee ) { // In indeterminate mode we don't have any estimation neither for the // remaining nor for estimated time. - realEstimatedTime = - realRemainingTime = -1; + estimatedTime = + remainingTime = static_cast(-1); } wxString expandedInformation; @@ -1014,7 +1012,7 @@ void wxProgressDialog::UpdateExpandedInformation(int value) expandedInformation << GetEstimatedLabel() << " " - << GetFormattedTime(realEstimatedTime); + << GetFormattedTime(estimatedTime); } if ( HasPDFlag(wxPD_REMAINING_TIME) ) @@ -1024,7 +1022,7 @@ void wxProgressDialog::UpdateExpandedInformation(int value) expandedInformation << GetRemainingLabel() << " " - << GetFormattedTime(realRemainingTime); + << GetFormattedTime(remainingTime); } // Update with new timing information.