Total time is already known.

This commit is contained in:
Bartosz Taudul 2018-06-06 23:00:18 +02:00
parent 8a4d88f2b3
commit 2950f3c70c

View File

@ -3393,6 +3393,7 @@ void View::DrawFindZone()
auto& zones = zoneData.zones; auto& zones = zoneData.zones;
const auto tmin = zoneData.min; const auto tmin = zoneData.min;
const auto tmax = zoneData.max; const auto tmax = zoneData.max;
const auto timeTotal = zoneData.total;
if( tmin != std::numeric_limits<int64_t>::max() ) if( tmin != std::numeric_limits<int64_t>::max() )
{ {
@ -3598,7 +3599,6 @@ void View::DrawFindZone()
} }
} }
int64_t timeTotal = binTime[0];
int64_t maxVal; int64_t maxVal;
if( cumulateTime ) if( cumulateTime )
{ {
@ -3606,7 +3606,6 @@ void View::DrawFindZone()
for( int i=1; i<numBins; i++ ) for( int i=1; i<numBins; i++ )
{ {
maxVal = std::max( maxVal, binTime[i] ); maxVal = std::max( maxVal, binTime[i] );
timeTotal += binTime[i];
} }
} }
else else
@ -3615,7 +3614,6 @@ void View::DrawFindZone()
for( int i=1; i<numBins; i++ ) for( int i=1; i<numBins; i++ )
{ {
maxVal = std::max( maxVal, bins[i] ); maxVal = std::max( maxVal, bins[i] );
timeTotal += binTime[i];
} }
} }