mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Microoptimize comparison.
This commit is contained in:
parent
14292f9e35
commit
4d761def61
@ -1853,7 +1853,7 @@ void Worker::GetCpuUsageAtTime( int64_t time, int& own, int& other ) const
|
|||||||
if( !cs.empty() )
|
if( !cs.empty() )
|
||||||
{
|
{
|
||||||
auto it = std::lower_bound( cs.begin(), cs.end(), time, [] ( const auto& l, const auto& r ) { return (uint64_t)l.End() < (uint64_t)r; } );
|
auto it = std::lower_bound( cs.begin(), cs.end(), time, [] ( const auto& l, const auto& r ) { return (uint64_t)l.End() < (uint64_t)r; } );
|
||||||
if( it != cs.end() && it->Start() <= time && it->End() != -1 )
|
if( it != cs.end() && it->Start() <= time && it->End() >= 0 )
|
||||||
{
|
{
|
||||||
if( GetPidFromTid( DecompressThreadExternal( it->Thread() ) ) == m_pid )
|
if( GetPidFromTid( DecompressThreadExternal( it->Thread() ) ) == m_pid )
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user