mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +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
@@ -305,22 +305,22 @@ MxResult LegoPlantManager::Read(LegoStorage* p_storage)
|
||||
for (MxS32 i = 0; i < sizeOfArray(g_plantInfo); i++) {
|
||||
LegoPlantInfo* info = &g_plantInfo[i];
|
||||
|
||||
if (p_storage->Read(&info->m_variant, sizeof(info->m_variant)) != SUCCESS) {
|
||||
if (p_storage->Read(&info->m_variant, sizeof(MxU8)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&info->m_sound, sizeof(info->m_sound)) != SUCCESS) {
|
||||
if (p_storage->Read(&info->m_sound, sizeof(MxU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&info->m_move, sizeof(info->m_move)) != SUCCESS) {
|
||||
if (p_storage->Read(&info->m_move, sizeof(MxU32)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&info->m_mood, sizeof(info->m_mood)) != SUCCESS) {
|
||||
if (p_storage->Read(&info->m_mood, sizeof(MxU8)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&info->m_color, sizeof(info->m_color)) != SUCCESS) {
|
||||
if (p_storage->Read(&info->m_color, sizeof(MxU8)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
if (p_storage->Read(&info->m_unk0x16, sizeof(info->m_unk0x16)) != SUCCESS) {
|
||||
if (p_storage->Read(&info->m_unk0x16, sizeof(MxS8)) != SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user