mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 00:44:21 +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
@@ -43,23 +43,23 @@ LegoResult LegoMesh::Read(LegoStorage* p_storage)
|
||||
if ((result = m_color.Read(p_storage)) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_alpha, sizeof(m_alpha))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_alpha, sizeof(LegoFloat))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_shading, sizeof(m_shading))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_shading, sizeof(LegoU8))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_unk0x0d, sizeof(m_unk0x0d))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_unk0x0d, sizeof(LegoU8))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_unk0x20, sizeof(m_unk0x20))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_unk0x20, sizeof(undefined))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_unk0x21, sizeof(m_unk0x21))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_unk0x21, sizeof(LegoU8))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if ((result = p_storage->Read(&textureLength, sizeof(textureLength))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&textureLength, sizeof(LegoU32))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if (textureLength) {
|
||||
@@ -73,7 +73,7 @@ LegoResult LegoMesh::Read(LegoStorage* p_storage)
|
||||
strlwr(m_textureName);
|
||||
}
|
||||
|
||||
if ((result = p_storage->Read(&materialLength, sizeof(materialLength))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&materialLength, sizeof(LegoU32))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if (materialLength) {
|
||||
|
||||
Reference in New Issue
Block a user