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:
Anonymous Maarten
2025-05-18 22:56:28 +02:00
committed by GitHub
parent c9b41e2db8
commit 2915aa014f
27 changed files with 227 additions and 234 deletions

View File

@@ -45,21 +45,21 @@ public:
// FUNCTION: BETA10 0x1004b0d0
LegoStorage* WriteU8(LegoU8 p_data)
{
Write(&p_data, sizeof(p_data));
Write(&p_data, sizeof(LegoU8));
return this;
}
// FUNCTION: BETA10 0x10017ce0
LegoStorage* WriteS16(LegoS16 p_data)
{
Write(&p_data, sizeof(p_data));
Write(&p_data, sizeof(LegoS16));
return this;
}
// FUNCTION: BETA10 0x1004b110
LegoStorage* WriteU16(LegoU16 p_data)
{
Write(&p_data, sizeof(p_data));
Write(&p_data, sizeof(LegoU16));
return this;
}
@@ -67,7 +67,7 @@ public:
// FUNCTION: BETA10 0x10088540
LegoStorage* WriteS32(MxS32 p_data)
{
Write(&p_data, sizeof(p_data));
Write(&p_data, sizeof(MxS32));
return this;
}
@@ -75,14 +75,14 @@ public:
// FUNCTION: BETA10 0x1004b150
LegoStorage* WriteU32(MxU32 p_data)
{
Write(&p_data, sizeof(p_data));
Write(&p_data, sizeof(MxU32));
return this;
}
// FUNCTION: BETA10 0x10073610
LegoStorage* WriteFloat(LegoFloat p_data)
{
Write(&p_data, sizeof(p_data));
Write(&p_data, sizeof(LegoFloat));
return this;
}
@@ -116,21 +116,21 @@ public:
// FUNCTION: BETA10 0x1004b190
LegoStorage* ReadU8(LegoU8& p_data)
{
Read(&p_data, sizeof(p_data));
Read(&p_data, sizeof(LegoU8));
return this;
}
// FUNCTION: BETA10 0x10024680
LegoStorage* ReadS16(LegoS16& p_data)
{
Read(&p_data, sizeof(p_data));
Read(&p_data, sizeof(LegoS16));
return this;
}
// FUNCTION: BETA10 0x1004b1d0
LegoStorage* ReadU16(LegoU16& p_data)
{
Read(&p_data, sizeof(p_data));
Read(&p_data, sizeof(LegoU16));
return this;
}
@@ -138,7 +138,7 @@ public:
// FUNCTION: BETA10 0x10088580
LegoStorage* ReadS32(MxS32& p_data)
{
Read(&p_data, sizeof(p_data));
Read(&p_data, sizeof(MxS32));
return this;
}
@@ -146,14 +146,14 @@ public:
// FUNCTION: BETA10 0x1004b210
LegoStorage* ReadU32(MxU32& p_data)
{
Read(&p_data, sizeof(p_data));
Read(&p_data, sizeof(MxU32));
return this;
}
// FUNCTION: BETA10 0x10073650
LegoStorage* ReadFloat(LegoFloat& p_data)
{
Read(&p_data, sizeof(p_data));
Read(&p_data, sizeof(LegoFloat));
return this;
}