GCMemcard: Use std::array for DEntry.m_unused_2.

This commit is contained in:
Admiral H. Curtiss 2018-11-18 23:54:57 +01:00
parent 4175fdf28d
commit f8488f4561
2 changed files with 3 additions and 3 deletions

View File

@ -1076,7 +1076,7 @@ void GCMemcard::Gcs_SavConvert(DEntry& tempDEntry, int saveType, int length)
ByteSwap(&tmp[0], &tmp[1]);
memcpy(&tempDEntry.m_block_count, tmp.data(), 2);
ArrayByteSwap((tempDEntry.m_unused_2));
ByteSwap(&tempDEntry.m_unused_2[0], &tempDEntry.m_unused_2[1]);
memcpy(tmp.data(), &tempDEntry.m_comments_address, 4);
ByteSwap(&tmp[0], &tmp[1]);

View File

@ -220,8 +220,8 @@ struct DEntry
Common::BigEndianValue<u16>
m_first_block; // 0x36 0x02 Block no of first block of file (0 == offset 0)
Common::BigEndianValue<u16>
m_block_count; // 0x38 0x02 File-length (number of blocks in file)
u8 m_unused_2[2]; // 0x3a 0x02 Reserved/unused (always 0xffff, has no effect)
m_block_count; // 0x38 0x02 File-length (number of blocks in file)
std::array<u8, 2> m_unused_2; // 0x3a 0x02 Reserved/unused (always 0xffff, has no effect)
Common::BigEndianValue<u32>
m_comments_address; // 0x3c 0x04 Address of the two comments within the file data
// (*3)