mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Use reference on MxDSObject Deserialize calls (#767)
This commit is contained in:
@@ -36,12 +36,19 @@ MxU32 MxStreamChunk::ReadChunkHeader(MxU8* p_chunkData)
|
||||
MxU32 headersize = 0;
|
||||
if (p_chunkData) {
|
||||
MxU8* chunkData = p_chunkData;
|
||||
// Note: the alpha debug version uses memcpy calls here,
|
||||
// but the code generation is the same.
|
||||
GetScalar(&p_chunkData, m_flags);
|
||||
GetScalar(&p_chunkData, m_objectId);
|
||||
GetScalar(&p_chunkData, m_time);
|
||||
GetScalar(&p_chunkData, m_length);
|
||||
|
||||
memcpy(&m_flags, p_chunkData, sizeof(m_flags));
|
||||
p_chunkData += sizeof(m_flags);
|
||||
|
||||
memcpy(&m_objectId, p_chunkData, sizeof(m_objectId));
|
||||
p_chunkData += sizeof(m_objectId);
|
||||
|
||||
memcpy(&m_time, p_chunkData, sizeof(m_time));
|
||||
p_chunkData += sizeof(m_time);
|
||||
|
||||
memcpy(&m_length, p_chunkData, sizeof(m_length));
|
||||
p_chunkData += sizeof(m_length);
|
||||
|
||||
m_data = p_chunkData;
|
||||
headersize = p_chunkData - chunkData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user