mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +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
@@ -17,13 +17,13 @@ LegoVertex::LegoVertex()
|
||||
LegoResult LegoVertex::Read(LegoStorage* p_storage)
|
||||
{
|
||||
LegoResult result;
|
||||
if ((result = p_storage->Read(&m_coordinates[0], sizeof(m_coordinates[0]))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_coordinates[0], sizeof(LegoFloat))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_coordinates[1], sizeof(m_coordinates[1]))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_coordinates[1], sizeof(LegoFloat))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
if ((result = p_storage->Read(&m_coordinates[2], sizeof(m_coordinates[2]))) != SUCCESS) {
|
||||
if ((result = p_storage->Read(&m_coordinates[2], sizeof(LegoFloat))) != SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
return SUCCESS;
|
||||
|
Reference in New Issue
Block a user