mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
No need to check for zero value in a sorted set.
This commit is contained in:
parent
0c086e3a30
commit
213b33a4fa
@ -6457,27 +6457,25 @@ void View::DrawInfo()
|
||||
{
|
||||
const auto tMinLog = log10fast( tmin );
|
||||
const auto idt = numBins / ( log10fast( tmax ) - tMinLog );
|
||||
for( auto& ft : frames )
|
||||
auto fit = frames.begin();
|
||||
while( fit != frames.end() && *fit == 0 ) fit++;
|
||||
while( fit != frames.end() )
|
||||
{
|
||||
if( ft != 0 )
|
||||
{
|
||||
const auto bin = std::min( numBins - 1, int64_t( ( log10fast( ft ) - tMinLog ) * idt ) );
|
||||
const auto bin = std::min( numBins - 1, int64_t( ( log10fast( *fit++ ) - tMinLog ) * idt ) );
|
||||
bins[bin]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto idt = numBins / dt;
|
||||
for( auto& ft : frames )
|
||||
auto fit = frames.begin();
|
||||
while( fit != frames.end() && *fit == 0 ) fit++;
|
||||
while( fit != frames.end() )
|
||||
{
|
||||
if( ft != 0 )
|
||||
{
|
||||
const auto bin = std::min( numBins - 1, int64_t( ( ft - tmin ) * idt ) );
|
||||
const auto bin = std::min( numBins - 1, int64_t( ( *fit++ - tmin ) * idt ) );
|
||||
bins[bin]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int64_t maxVal = bins[0];
|
||||
for( int i=1; i<numBins; i++ )
|
||||
|
Loading…
Reference in New Issue
Block a user