GCMemcard: GCMBlock: Move code out of header.

This commit is contained in:
Admiral H. Curtiss 2019-04-21 17:37:03 +02:00
parent e4094d9d2d
commit 17da22a84f
2 changed files with 12 additions and 2 deletions

View File

@ -1420,6 +1420,16 @@ s32 GCMemcard::PSO_MakeSaveGameValid(const Header& cardheader, const DEntry& dir
return 1;
}
GCMBlock::GCMBlock()
{
Erase();
}
void GCMBlock::Erase()
{
memset(m_block.data(), 0xFF, m_block.size());
}
Header::Header(int slot, u16 size_mbits, bool shift_jis)
{
// Nintendo format algorithm.

View File

@ -92,8 +92,8 @@ protected:
struct GCMBlock
{
GCMBlock() { Erase(); }
void Erase() { memset(m_block.data(), 0xFF, m_block.size()); }
GCMBlock();
void Erase();
std::array<u8, BLOCK_SIZE> m_block;
};