From 4d761def6129690d7a88a58e7b7c19f8e53603d4 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 16 Oct 2019 20:26:39 +0200 Subject: [PATCH] Microoptimize comparison. --- server/TracyWorker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 2d968a48..3d1c63aa 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1853,7 +1853,7 @@ void Worker::GetCpuUsageAtTime( int64_t time, int& own, int& other ) const 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; } ); - 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 ) {