Merge pull request #6516 from lioncash/cpu-base

CPUCoreBase: Make the GetName() member function const qualified
This commit is contained in:
Léo Lam 2018-03-24 22:16:40 +01:00 committed by GitHub
commit 3c3d2be5ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View File

@ -102,7 +102,7 @@ public:
PanicAlertT("Cannot SingleStep the FIFO. Use Frame Advance instead."); 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 void Run() override
{ {
while (CPU::GetState() == CPU::State::Running) while (CPU::GetState() == CPU::State::Running)

View File

@ -7,11 +7,11 @@
class CPUCoreBase class CPUCoreBase
{ {
public: public:
virtual ~CPUCoreBase() {} virtual ~CPUCoreBase() = default;
virtual void Init() = 0; virtual void Init() = 0;
virtual void Shutdown() = 0; virtual void Shutdown() = 0;
virtual void ClearCache() = 0; virtual void ClearCache() = 0;
virtual void Run() = 0; virtual void Run() = 0;
virtual void SingleStep() = 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; void Jit(u32 address) override;
JitBaseBlockCache* GetBlockCache() override { return &m_block_cache; } 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; } const CommonAsmRoutinesBase* GetAsmRoutines() override { return nullptr; }
private: private:
struct Instruction; struct Instruction;

View File

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

View File

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

View File

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

View File

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

View File

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