Save threadExpand size to allow vector preallocation.

This commit is contained in:
Bartosz Taudul 2018-07-29 15:19:44 +02:00
parent bff6eb4c34
commit 00d07e39f7

View File

@ -309,6 +309,12 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
m_data.threadNames.emplace( id, pointerMap.find( ptr )->second );
}
if( fileVer >= FileVersion( 0, 3, 201 ) )
{
f.Read( sz );
m_data.threadExpand.reserve( sz );
}
f.Read( sz );
for( uint64_t i=0; i<sz; i++ )
{
@ -2792,6 +2798,9 @@ void Worker::Write( FileWrite& f )
f.Write( &ptr, sizeof( ptr ) );
}
sz = m_data.threadExpand.size();
f.Write( &sz, sizeof( sz ) );
sz = m_data.sourceLocation.size();
f.Write( &sz, sizeof( sz ) );
for( auto& v : m_data.sourceLocation )