diff options
| author | JosJuice <josjuice@gmail.com> | 2017-03-09 15:39:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-09 15:39:12 +0100 |
| commit | d847a4030b089621735d2bcb181fb4b8763fa9c3 (patch) | |
| tree | 7269c5c4b585178a1d5e1dbf4e3f46c7f57f04b8 /Source | |
| parent | 883bec873fd1e74e090331d437a84af43126bcbe (diff) | |
| parent | 40cdd327600fd07e1291d42942a2b676abe8c2c9 (diff) | |
Merge pull request #5042 from lioncash/explicit
GCMemcard: Mark class constructors explicit where applicable
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/GCMemcard.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/Core/HW/GCMemcard.h b/Source/Core/Core/HW/GCMemcard.h index 0b501e206f..25dd196f45 100644 --- a/Source/Core/Core/HW/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard.h @@ -70,7 +70,7 @@ enum class MemoryCardBase { public: - MemoryCardBase(int _card_index = 0, int sizeMb = MemCard2043Mb) + explicit MemoryCardBase(int _card_index = 0, int sizeMb = MemCard2043Mb) : card_index(_card_index), nintendo_card_id(sizeMb) { } @@ -132,7 +132,7 @@ struct Header // Offset Size Description // Nintendo format algorithm. // Constants are fixed by the GC SDK // Changing the constants will break memory card support - Header(int slot = 0, u16 sizeMb = MemCard2043Mb, bool shift_jis = false) + explicit Header(int slot = 0, u16 sizeMb = MemCard2043Mb, bool shift_jis = false) { memset(this, 0xFF, BLOCK_SIZE); *(u16*)SizeMb = BE16(sizeMb); @@ -245,7 +245,7 @@ struct BlockAlloc u16 NextFreeBlock(u16 MaxBlock, u16 StartingBlock = MC_FST_BLOCKS) const; bool ClearBlocks(u16 StartingBlock, u16 Length); void fixChecksums() { calc_checksumsBE((u16*)&UpdateCounter, 0xFFE, &Checksum, &Checksum_Inv); } - BlockAlloc(u16 sizeMb = MemCard2043Mb) + explicit BlockAlloc(u16 sizeMb = MemCard2043Mb) { memset(this, 0, BLOCK_SIZE); // UpdateCounter = 0; @@ -315,7 +315,8 @@ private: void InitDirBatPointers(); public: - GCMemcard(const std::string& fileName, bool forceCreation = false, bool shift_jis = false); + explicit GCMemcard(const std::string& fileName, bool forceCreation = false, + bool shift_jis = false); bool IsValid() const { return m_valid; } bool IsShiftJIS() const; bool Save(); |
