Save and load sections data.

This commit is contained in:
Bartosz Taudul
2026-06-21 00:56:32 +02:00
parent 3157dfae3e
commit 3a6a23ca98
2 changed files with 13 additions and 5 deletions
+11
View File
@@ -726,6 +726,13 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks, bool allow
m_data.framesBase = m_data.frames.Data()[0];
assert( m_data.framesBase->name == 0 );
if( fileVer >= FileVersion( 0, 13, 4 ) )
{
f.Read( sz );
m_data.sections.reserve_exact( sz, m_slab );
f.Read( m_data.sections.data(), sz * sizeof( SectionItem ) );
}
unordered_flat_map<uint64_t, const char*> pointerMap;
f.Read( sz );
@@ -8226,6 +8233,10 @@ void Worker::Write( FileWrite& f, bool fiDict )
}
}
sz = m_data.sections.size();
f.Write( &sz, sizeof( sz ) );
f.Write( m_data.sections.data(), sz * sizeof( SectionItem ) );
sz = m_data.stringData.size();
f.Write( &sz, sizeof( sz ) );
for( auto& v : m_data.stringData )