Skip to content
Permalink
Browse files
Merge pull request #6516 from lioncash/cpu-base
CPUCoreBase: Make the GetName() member function const qualified
  • Loading branch information
leoetlino committed Mar 24, 2018
2 parents 5369d3c + 397b3fb commit 3c3d2be
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
@@ -102,7 +102,7 @@ class FifoPlayer::CPUCore final : public CPUCoreBase
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)
@@ -7,11 +7,11 @@
class CPUCoreBase
{
public:
virtual ~CPUCoreBase() {}
virtual ~CPUCoreBase() = default;
virtual void Init() = 0;
virtual void Shutdown() = 0;
virtual void ClearCache() = 0;
virtual void Run() = 0;
virtual void SingleStep() = 0;
virtual const char* GetName() = 0;
virtual const char* GetName() const = 0;
};
@@ -29,7 +29,7 @@ class CachedInterpreter : public JitBase
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;
@@ -330,7 +330,7 @@ void Interpreter::ClearCache()
// Do nothing.
}

const char* Interpreter::GetName()
const char* Interpreter::GetName() const
{
#ifdef _ARCH_64
return "Interpreter64";
@@ -20,7 +20,7 @@ class Interpreter : public CPUCoreBase

void Run() override;
void ClearCache() override;
const char* GetName() override;
const char* GetName() const override;

static void unknown_instruction(UGeckoInstruction inst);

@@ -59,7 +59,7 @@ class Jit64 : public Jitx86Base
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;
@@ -41,7 +41,7 @@ class JitArm64 : public JitBase, public Arm64Gen::ARM64CodeBlock, public CommonA

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);
@@ -30,7 +30,7 @@ class PageFaultFakeJit : public JitBase
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 {}

0 comments on commit 3c3d2be

Please sign in to comment.