mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +00:00
Perform search after condition was verified, not before.
This commit is contained in:
parent
3ac98beb5a
commit
40c6f01a41
@ -1241,11 +1241,11 @@ void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
|
|||||||
m_data.lastTime = std::max( m_data.lastTime, zone->end );
|
m_data.lastTime = std::max( m_data.lastTime, zone->end );
|
||||||
|
|
||||||
#ifndef TRACY_NO_STATISTICS
|
#ifndef TRACY_NO_STATISTICS
|
||||||
auto it = m_data.sourceLocationZones.find( zone->srcloc );
|
|
||||||
assert( it != m_data.sourceLocationZones.end() );
|
|
||||||
const auto timeSpan = zone->end - zone->start;
|
const auto timeSpan = zone->end - zone->start;
|
||||||
if( timeSpan > 0 )
|
if( timeSpan > 0 )
|
||||||
{
|
{
|
||||||
|
auto it = m_data.sourceLocationZones.find( zone->srcloc );
|
||||||
|
assert( it != m_data.sourceLocationZones.end() );
|
||||||
it->second.min = std::min( it->second.min, timeSpan );
|
it->second.min = std::min( it->second.min, timeSpan );
|
||||||
it->second.max = std::max( it->second.max, timeSpan );
|
it->second.max = std::max( it->second.max, timeSpan );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user