mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Store proper children in edge-case code.
This commit is contained in:
parent
d427e937d3
commit
192493a2c3
@ -406,14 +406,14 @@ void View::InsertZone( Event* zone, Event* parent, Vector<Event*>& vec )
|
|||||||
{
|
{
|
||||||
zone->parent = parent;
|
zone->parent = parent;
|
||||||
|
|
||||||
// here be dragons
|
|
||||||
// this code is not tested, as it's a fallback for edge cases, which haven't happened
|
|
||||||
if( zone->end == -1 )
|
if( zone->end == -1 )
|
||||||
{
|
{
|
||||||
|
// here be dragons
|
||||||
|
// this code is not tested, as it's a fallback for edge cases, which haven't happened
|
||||||
for( auto zit = it; zit != vec.end(); ++zit )
|
for( auto zit = it; zit != vec.end(); ++zit )
|
||||||
{
|
{
|
||||||
(*zit)->parent = zone;
|
(*zit)->parent = zone;
|
||||||
zone->child.push_back( zone );
|
zone->child.push_back( *zit );
|
||||||
}
|
}
|
||||||
vec.erase( it, vec.end() );
|
vec.erase( it, vec.end() );
|
||||||
vec.push_back( zone );
|
vec.push_back( zone );
|
||||||
@ -424,7 +424,7 @@ void View::InsertZone( Event* zone, Event* parent, Vector<Event*>& vec )
|
|||||||
for( auto zit = it; zit != eit; zit++ )
|
for( auto zit = it; zit != eit; zit++ )
|
||||||
{
|
{
|
||||||
(*zit)->parent = zone;
|
(*zit)->parent = zone;
|
||||||
zone->child.push_back( zone );
|
zone->child.push_back( *zit );
|
||||||
}
|
}
|
||||||
auto nit = vec.erase( it, eit );
|
auto nit = vec.erase( it, eit );
|
||||||
vec.insert( nit, zone );
|
vec.insert( nit, zone );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user