| 1 | #include "snapshot.h" |
|---|---|
| 2 | |
| 3 | #include <base/system.h> |
| 4 | |
| 5 | void CSnapshotBuilder::Init7(const CSnapshot *pSnapshot) |
| 6 | { |
| 7 | dbg_assert(!m_Building, "Snapshot builder is already building snapshot. Call `Finish` for each call to `Init`."); |
| 8 | |
| 9 | // the method is called Init7 because it is only used for 0.7 support |
| 10 | // but the snap we are building is a 0.6 snap |
| 11 | m_Building = true; |
| 12 | m_Sixup = false; |
| 13 | |
| 14 | m_DataSize = pSnapshot->m_DataSize; |
| 15 | m_NumItems = pSnapshot->m_NumItems; |
| 16 | mem_copy(dest: m_aOffsets, source: pSnapshot->Offsets(), size: sizeof(int) * m_NumItems); |
| 17 | mem_copy(dest: m_aData, source: pSnapshot->DataStart(), size: m_DataSize); |
| 18 | } |
| 19 |