class CSnapshotDelta DeltaCopy;
mem_copy(&DeltaCopy, &m_SnapshotDelta, sizeof(m_SnapshotDelta));
to not use directly m_SnapshotDeltaclass CSnapshotDelta DeltaCopy;
mem_copy(&DeltaCopy, &m_SnapshotDelta, sizeof(m_SnapshotDelta));
to not use directly m_SnapshotDelta
?CDemoEdit::CDemoEdit(const char *pNetVersion, CSnapshotDelta *pSnapshotDelta, IStorage *pStorage, const char *pDemo, const char *pDst, int StartTick, int EndTick) :
m_pStorage(pStorage)
{
str_copy(m_aDemo, pDemo, sizeof(m_aDemo));
str_copy(m_aDst, pDst, sizeof(m_aDst));
m_StartTick = StartTick;
m_EndTick = EndTick;
// Init the demoeditor
m_DemoEditor.Init(pNetVersion, &CSnapshotDelta(*pSnapshotDelta), NULL, pStorage);
}
mem_copy
everything in CSnapshotDelta
:xCSnapshotDelta
thing is immediately destroyed after it is created in your codeCSnapshotDelta
a member of CDemoEdit
m_SnapshotDelta(*pSnapshotDelta),
above m_pStorage