mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
No need to check for zero value in a sorted set.
This commit is contained in:
parent
0c086e3a30
commit
213b33a4fa
@ -6457,25 +6457,23 @@ 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 ) );
|
||||
bins[bin]++;
|
||||
}
|
||||
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 ) );
|
||||
bins[bin]++;
|
||||
}
|
||||
const auto bin = std::min( numBins - 1, int64_t( ( *fit++ - tmin ) * idt ) );
|
||||
bins[bin]++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user