mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Use sizeof(type) instead of sizeof(variableName) when (de)serializing data (#1505)
* Use sizeof(type) instead of sizeof(variableName) when (de)serializing data * Less usage of sizeof(variableName) while (de)serializing
This commit is contained in:

committed by
GitHub

parent
c9b41e2db8
commit
2915aa014f
@@ -128,7 +128,7 @@ LegoResult LegoROI::Read(
|
||||
|
||||
m_parentROI = p_unk0xd4;
|
||||
|
||||
if (p_storage->Read(&length, sizeof(length)) != SUCCESS) {
|
||||
if (p_storage->Read(&length, sizeof(LegoU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
m_name = new LegoChar[length + 1];
|
||||
@@ -153,7 +153,7 @@ LegoResult LegoROI::Read(
|
||||
SET3(m_unk0x80.Min(), box.GetMin());
|
||||
SET3(m_unk0x80.Max(), box.GetMax());
|
||||
|
||||
if (p_storage->Read(&length, sizeof(length)) != SUCCESS) {
|
||||
if (p_storage->Read(&length, sizeof(LegoU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ LegoResult LegoROI::Read(
|
||||
textureName = NULL;
|
||||
}
|
||||
|
||||
if (p_storage->Read(&m_unk0x100, sizeof(m_unk0x100)) != SUCCESS) {
|
||||
if (p_storage->Read(&m_unk0x100, sizeof(undefined)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ LegoResult LegoROI::Read(
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (p_storage->Read(&numLODs, sizeof(numLODs)) != SUCCESS) {
|
||||
if (p_storage->Read(&numLODs, sizeof(LegoU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ LegoResult LegoROI::Read(
|
||||
const LegoChar* roiName = m_name;
|
||||
LegoU32 offset;
|
||||
|
||||
if (p_storage->Read(&offset, sizeof(offset)) != SUCCESS) {
|
||||
if (p_storage->Read(&offset, sizeof(LegoU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ LegoResult LegoROI::Read(
|
||||
}
|
||||
}
|
||||
|
||||
if (p_storage->Read(&numROIs, sizeof(numROIs)) != SUCCESS) {
|
||||
if (p_storage->Read(&numROIs, sizeof(LegoU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user