mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Back-and-pop operation on Vector.
This commit is contained in:
parent
a4e909a740
commit
94bd563753
@ -153,6 +153,13 @@ public:
|
|||||||
m_size--;
|
m_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T& back_and_pop()
|
||||||
|
{
|
||||||
|
assert( m_size > 0 );
|
||||||
|
m_size--;
|
||||||
|
return m_ptr[m_size];
|
||||||
|
}
|
||||||
|
|
||||||
void reserve( size_t cap )
|
void reserve( size_t cap )
|
||||||
{
|
{
|
||||||
if( cap == 0 || cap <= Capacity() ) return;
|
if( cap == 0 || cap <= Capacity() ) return;
|
||||||
|
@ -662,8 +662,7 @@ void View::ProcessZoneEnd( const QueueZoneEnd& ev )
|
|||||||
auto td = tit->second;
|
auto td = tit->second;
|
||||||
auto& stack = td->stack;
|
auto& stack = td->stack;
|
||||||
assert( !stack.empty() );
|
assert( !stack.empty() );
|
||||||
auto zone = stack.back();
|
auto zone = stack.back_and_pop();
|
||||||
stack.pop_back();
|
|
||||||
assert( zone->end == -1 );
|
assert( zone->end == -1 );
|
||||||
zone->end = ev.time * m_timerMul;
|
zone->end = ev.time * m_timerMul;
|
||||||
assert( ev.cpu == 0xFFFFFFFF || ev.cpu <= std::numeric_limits<int8_t>::max() );
|
assert( ev.cpu == 0xFFFFFFFF || ev.cpu <= std::numeric_limits<int8_t>::max() );
|
||||||
|
Loading…
Reference in New Issue
Block a user