CPUCoreBase: Make the GetName() member function const qualified

This function should have no need to modify internal class state.
This commit is contained in:
Lioncash 2018-03-24 15:59:20 -04:00
parent c738ddc4aa
commit 397b3fb976
8 changed files with 8 additions and 8 deletions

View file

@ -102,7 +102,7 @@ public:
PanicAlertT("Cannot SingleStep the FIFO. Use Frame Advance instead.");
}
const char* GetName() override { return "FifoPlayer"; }
const char* GetName() const override { return "FifoPlayer"; }
void Run() override
{
while (CPU::GetState() == CPU::State::Running)

View file

@ -13,5 +13,5 @@ public:
virtual void ClearCache() = 0;
virtual void Run() = 0;
virtual void SingleStep() = 0;
virtual const char* GetName() = 0;
virtual const char* GetName() const = 0;
};

View file

@ -29,7 +29,7 @@ public:
void Jit(u32 address) override;
JitBaseBlockCache* GetBlockCache() override { return &m_block_cache; }
const char* GetName() override { return "Cached Interpreter"; }
const char* GetName() const override { return "Cached Interpreter"; }
const CommonAsmRoutinesBase* GetAsmRoutines() override { return nullptr; }
private:
struct Instruction;

View file

@ -330,7 +330,7 @@ void Interpreter::ClearCache()
// Do nothing.
}
const char* Interpreter::GetName()
const char* Interpreter::GetName() const
{
#ifdef _ARCH_64
return "Interpreter64";

View file

@ -20,7 +20,7 @@ public:
void Run() override;
void ClearCache() override;
const char* GetName() override;
const char* GetName() const override;
static void unknown_instruction(UGeckoInstruction inst);

View file

@ -59,7 +59,7 @@ public:
void ClearCache() override;
const CommonAsmRoutines* GetAsmRoutines() override { return &asm_routines; }
const char* GetName() override { return "JIT64"; }
const char* GetName() const override { return "JIT64"; }
// Run!
void Run() override;
void SingleStep() override;

View file

@ -41,7 +41,7 @@ public:
void Jit(u32) override;
const char* GetName() override { return "JITARM64"; }
const char* GetName() const override { return "JITARM64"; }
// OPCODES
void FallBackToInterpreter(UGeckoInstruction inst);
void DoNothing(UGeckoInstruction inst);

View file

@ -30,7 +30,7 @@ public:
void ClearCache() override {}
void Run() override {}
void SingleStep() override {}
const char* GetName() override { return nullptr; }
const char* GetName() const override { return nullptr; }
// JitBase methods
JitBaseBlockCache* GetBlockCache() override { return nullptr; }
void Jit(u32 em_address) override {}