DSPEmitter: Convert a C array to a std::array
This commit is contained in:
parent
3405f0ba01
commit
4846f26916
|
@ -69,7 +69,7 @@ u16 DSPEmitter::RunCycles(u16 cycles)
|
|||
|
||||
void DSPEmitter::ClearIRAM()
|
||||
{
|
||||
for (int i = 0x0000; i < 0x1000; i++)
|
||||
for (size_t i = 0; i < DSP_IRAM_SIZE; i++)
|
||||
{
|
||||
m_blocks[i] = (DSPCompiledCode)m_stub_entry_point;
|
||||
m_block_links[i] = nullptr;
|
||||
|
@ -85,7 +85,7 @@ void DSPEmitter::ClearIRAMandDSPJITCodespaceReset()
|
|||
CompileDispatcher();
|
||||
m_stub_entry_point = CompileStub();
|
||||
|
||||
for (int i = 0x0000; i < 0x10000; i++)
|
||||
for (size_t i = 0; i < MAX_BLOCKS; i++)
|
||||
{
|
||||
m_blocks[i] = (DSPCompiledCode)m_stub_entry_point;
|
||||
m_block_links[i] = nullptr;
|
||||
|
@ -333,7 +333,7 @@ void DSPEmitter::Compile(u16 start_addr)
|
|||
{
|
||||
m_block_links[start_addr] = m_block_link_entry;
|
||||
|
||||
for (u16 i = 0x0000; i < 0xffff; ++i)
|
||||
for (size_t i = 0; i < 0xffff; ++i)
|
||||
{
|
||||
if (!m_unresolved_jumps[i].empty())
|
||||
{
|
||||
|
@ -380,7 +380,7 @@ static void CompileCurrent()
|
|||
while (retry)
|
||||
{
|
||||
retry = false;
|
||||
for (u16 i = 0x0000; i < 0xffff; ++i)
|
||||
for (size_t i = 0; i < 0xffff; ++i)
|
||||
{
|
||||
if (!g_dsp_jit->m_unresolved_jumps[i].empty())
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
@ -247,7 +248,7 @@ public:
|
|||
void madd(const UDSPInstruction opc);
|
||||
void msub(const UDSPInstruction opc);
|
||||
|
||||
std::list<u16> m_unresolved_jumps[MAX_BLOCKS];
|
||||
std::array<std::list<u16>, MAX_BLOCKS> m_unresolved_jumps;
|
||||
|
||||
private:
|
||||
void WriteBranchExit();
|
||||
|
|
Loading…
Reference in New Issue