mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
No need to check for reserved space.
This commit is contained in:
parent
b7ba64a223
commit
c510c9705b
@ -87,6 +87,11 @@ public:
|
|||||||
m_ptr[m_size++] = v;
|
m_ptr[m_size++] = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void push_back_no_space_check( const T& v )
|
||||||
|
{
|
||||||
|
m_ptr[m_size++] = v;
|
||||||
|
}
|
||||||
|
|
||||||
void push_back( T&& v )
|
void push_back( T&& v )
|
||||||
{
|
{
|
||||||
if( m_size == Capacity() ) AllocMore();
|
if( m_size == Capacity() ) AllocMore();
|
||||||
|
@ -1566,7 +1566,7 @@ void Worker::ReadTimeline( FileRead& f, Vector<ZoneEvent*>& vec )
|
|||||||
for( uint64_t i=0; i<sz; i++ )
|
for( uint64_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
auto zone = m_slab.AllocInit<ZoneEvent>();
|
auto zone = m_slab.AllocInit<ZoneEvent>();
|
||||||
vec.push_back( zone );
|
vec.push_back_no_space_check( zone );
|
||||||
|
|
||||||
f.Read( &zone->start, sizeof( zone->start ) );
|
f.Read( &zone->start, sizeof( zone->start ) );
|
||||||
f.Read( &zone->end, sizeof( zone->end ) );
|
f.Read( &zone->end, sizeof( zone->end ) );
|
||||||
@ -1587,8 +1587,7 @@ void Worker::ReadTimeline( FileRead& f, Vector<GpuEvent*>& vec )
|
|||||||
for( uint64_t i=0; i<sz; i++ )
|
for( uint64_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
auto zone = m_slab.AllocInit<GpuEvent>();
|
auto zone = m_slab.AllocInit<GpuEvent>();
|
||||||
|
vec.push_back_no_space_check( zone );
|
||||||
vec.push_back( zone );
|
|
||||||
|
|
||||||
f.Read( &zone->cpuStart, sizeof( zone->cpuStart ) );
|
f.Read( &zone->cpuStart, sizeof( zone->cpuStart ) );
|
||||||
f.Read( &zone->cpuEnd, sizeof( zone->cpuEnd ) );
|
f.Read( &zone->cpuEnd, sizeof( zone->cpuEnd ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user