mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
RegisterView: Get rid of explicit memsets in CRegTable's constructor
Also gets rid of an unnecessary fill. This is done by just default initializing the arrays
This commit is contained in:
parent
212cf4c791
commit
567d0204dd
@ -220,17 +220,8 @@ bool TryParseGPR(wxString str, CRegTable::FormatSpecifier format, u32* value)
|
||||
|
||||
CRegTable::CRegTable()
|
||||
{
|
||||
m_formatRegs.fill(FormatSpecifier::Hex8);
|
||||
|
||||
for (auto& entry : m_formatFRegs)
|
||||
entry.fill(FormatSpecifier::Hex16);
|
||||
|
||||
memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
|
||||
memset(m_CachedSpecialRegs, 0, sizeof(m_CachedSpecialRegs));
|
||||
memset(m_CachedFRegs, 0, sizeof(m_CachedFRegs));
|
||||
memset(m_CachedRegHasChanged, 0, sizeof(m_CachedRegHasChanged));
|
||||
memset(m_CachedSpecialRegHasChanged, 0, sizeof(m_CachedSpecialRegHasChanged));
|
||||
memset(m_CachedFRegHasChanged, 0, sizeof(m_CachedFRegHasChanged));
|
||||
}
|
||||
|
||||
wxString CRegTable::FormatGPR(int reg_index)
|
||||
|
@ -53,13 +53,13 @@ public:
|
||||
private:
|
||||
static constexpr size_t NUM_SPECIALS = 14;
|
||||
|
||||
u32 m_CachedRegs[32];
|
||||
u32 m_CachedSpecialRegs[NUM_SPECIALS];
|
||||
u64 m_CachedFRegs[32][2];
|
||||
bool m_CachedRegHasChanged[32];
|
||||
bool m_CachedSpecialRegHasChanged[NUM_SPECIALS];
|
||||
bool m_CachedFRegHasChanged[32][2];
|
||||
std::array<FormatSpecifier, 32> m_formatRegs;
|
||||
std::array<u32, 32> m_CachedRegs{};
|
||||
std::array<u32, NUM_SPECIALS> m_CachedSpecialRegs{};
|
||||
std::array<std::array<u64, 2>, 32> m_CachedFRegs{};
|
||||
std::array<bool, 32> m_CachedRegHasChanged{};
|
||||
std::array<bool, NUM_SPECIALS> m_CachedSpecialRegHasChanged{};
|
||||
std::array<std::array<bool, 2>, 32> m_CachedFRegHasChanged{};
|
||||
std::array<FormatSpecifier, 32> m_formatRegs{};
|
||||
std::array<std::array<FormatSpecifier, 2>, 32> m_formatFRegs;
|
||||
|
||||
wxString FormatGPR(int reg_index);
|
||||
|
Loading…
Reference in New Issue
Block a user