mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +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 tMinLog = log10fast( tmin );
|
||||||
const auto idt = numBins / ( log10fast( tmax ) - tMinLog );
|
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( *fit++ ) - tMinLog ) * idt ) );
|
||||||
{
|
|
||||||
const auto bin = std::min( numBins - 1, int64_t( ( log10fast( ft ) - tMinLog ) * idt ) );
|
|
||||||
bins[bin]++;
|
bins[bin]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const auto idt = numBins / dt;
|
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( ( *fit++ - tmin ) * idt ) );
|
||||||
{
|
|
||||||
const auto bin = std::min( numBins - 1, int64_t( ( ft - tmin ) * idt ) );
|
|
||||||
bins[bin]++;
|
bins[bin]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int64_t maxVal = bins[0];
|
int64_t maxVal = bins[0];
|
||||||
for( int i=1; i<numBins; i++ )
|
for( int i=1; i<numBins; i++ )
|
||||||
|
Loading…
Reference in New Issue
Block a user