diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2018-05-20 10:45:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-20 10:45:44 +0200 |
| commit | eae45e0e2cd50fc0dac1e1af938f3a4c33e50733 (patch) | |
| tree | 362eb74fc9d9c52ea2be4ff9d8b7b9579f7b0fff /Source/Core | |
| parent | 464bfb073e7be600504a18c0b1b55a6dab8d876b (diff) | |
| parent | ced806a00aea9ef606aadc3bc5be17114555622d (diff) | |
Merge pull request #6911 from lioncash/analyst
PPCAnalyst: Replace memset usages with list initialization
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCAnalyst.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index a73080a429..3c9562a989 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -645,7 +645,7 @@ void PPCAnalyzer::SetInstructionStats(CodeBlock* block, CodeOp* code, const Gekk u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std::size_t block_size) { // Clear block stats - memset(block->m_stats, 0, sizeof(BlockStats)); + *block->m_stats = {}; // Clear register stats block->m_gpa->any = true; @@ -681,12 +681,12 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock* block, CodeBuffer* buffer, std: block->m_memory_exception = true; break; } - UGeckoInstruction inst = result.hex; num_inst++; - memset(&code[i], 0, sizeof(CodeOp)); - GekkoOPInfo* opinfo = PPCTables::GetOpInfo(inst); + const UGeckoInstruction inst = result.hex; + GekkoOPInfo* opinfo = PPCTables::GetOpInfo(inst); + code[i] = {}; code[i].opinfo = opinfo; code[i].address = address; code[i].inst = inst; |
