mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 08:54:34 +00:00
Remove rather useless check.
The prev == it condition could only fire on the first run of the loop, and on all subsequent runs prev (=next-1) will never be "it" anymore. Lack of this condition changes nothing, as the following lines checking for time distance between next and prev satisfy the same exit condition (i.e. next-1 will be "it" only if lower_bound does not find anything, hence next is farther away than MinVisNs).
This commit is contained in:
parent
e0cc6edbfb
commit
f2700b2786
@ -358,7 +358,6 @@ int TimelineItemThread::PreprocessGhostLevel( const TimelineContext& ctx, const
|
||||
next = std::lower_bound( next, zitend, nextTime, [] ( const auto& l, const auto& r ) { return l.end.Val() < r; } );
|
||||
if( next == zitend ) break;
|
||||
auto prev = next - 1;
|
||||
if( prev == it ) break;
|
||||
const auto pt = prev->end.Val();
|
||||
const auto nt = next->end.Val();
|
||||
if( nt - pt >= MinVisNs ) break;
|
||||
@ -432,7 +431,6 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V
|
||||
next = std::lower_bound( next, zitend, nextTime, [this] ( const auto& l, const auto& r ) { Adapter a; return m_worker.GetZoneEnd( a(l) ) < r; } );
|
||||
if( next == zitend ) break;
|
||||
auto prev = next - 1;
|
||||
if( prev == it ) break;
|
||||
const auto pt = m_worker.GetZoneEnd( a(*prev) );
|
||||
const auto nt = m_worker.GetZoneEnd( a(*next) );
|
||||
if( nt - pt >= MinVisNs ) break;
|
||||
@ -575,7 +573,6 @@ void TimelineItemThread::PreprocessSamples( const TimelineContext& ctx, const Ve
|
||||
next = std::lower_bound( next, itend, nextTime, [] ( const auto& l, const auto& r ) { return l.time.Val() < r; } );
|
||||
if( next == itend ) break;
|
||||
auto prev = next - 1;
|
||||
if( prev == it ) break;
|
||||
const auto pt = prev->time.Val();
|
||||
const auto nt = next->time.Val();
|
||||
if( nt - pt >= MinVisNs ) break;
|
||||
|
Loading…
Reference in New Issue
Block a user