1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use just sign bit to check end value validity.

This commit is contained in:
Bartosz Taudul
2020-01-22 22:25:04 +01:00
parent 9420234a98
commit 54a767bf81
3 changed files with 21 additions and 20 deletions
+2 -2
View File
@@ -1892,7 +1892,7 @@ int64_t Worker::GetZoneEnd( const ZoneEvent& ev )
auto ptr = &ev;
for(;;)
{
if( ptr->End() >= 0 ) return ptr->End();
if( ptr->IsEndValid() ) return ptr->End();
if( ptr->Child() < 0 ) return ptr->Start();
auto& children = GetZoneChildren( ptr->Child() );
if( children.is_magic() )
@@ -5056,7 +5056,7 @@ void Worker::ReconstructZoneStatistics( ZoneEvent& zone, uint16_t thread )
ztd.SetZone( &zone );
ztd.SetThread( thread );
if( zone.End() >= 0 )
if( zone.IsEndValid() )
{
auto timeSpan = zone.End() - zone.Start();
if( timeSpan > 0 )