JitBase: Improve const-correctness

This commit is contained in:
Sintendo 2024-12-27 09:48:58 +01:00
parent 50d991780f
commit 5cc9bde1c1
2 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ JitBase::~JitBase()
CPUThreadConfigCallback::RemoveConfigChangedCallback(m_registered_config_callback_id); CPUThreadConfigCallback::RemoveConfigChangedCallback(m_registered_config_callback_id);
} }
bool JitBase::DoesConfigNeedRefresh() bool JitBase::DoesConfigNeedRefresh() const
{ {
return std::ranges::any_of(JIT_SETTINGS, [this](const auto& pair) { return std::ranges::any_of(JIT_SETTINGS, [this](const auto& pair) {
return this->*pair.first != Config::Get(*pair.second); return this->*pair.first != Config::Get(*pair.second);
@ -276,7 +276,7 @@ bool JitBase::CanMergeNextInstructions(int count) const
return true; return true;
} }
bool JitBase::ShouldHandleFPExceptionForInstruction(const PPCAnalyst::CodeOp* op) bool JitBase::ShouldHandleFPExceptionForInstruction(const PPCAnalyst::CodeOp* op) const
{ {
if (jo.fp_exceptions) if (jo.fp_exceptions)
return (op->opinfo->flags & FL_FLOAT_EXCEPTION) != 0; return (op->opinfo->flags & FL_FLOAT_EXCEPTION) != 0;

View File

@ -167,7 +167,7 @@ protected:
static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 23> JIT_SETTINGS; static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 23> JIT_SETTINGS;
bool DoesConfigNeedRefresh(); bool DoesConfigNeedRefresh() const;
void RefreshConfig(); void RefreshConfig();
void InitFastmemArena(); void InitFastmemArena();
@ -187,7 +187,7 @@ protected:
#endif #endif
} }
bool ShouldHandleFPExceptionForInstruction(const PPCAnalyst::CodeOp* op); bool ShouldHandleFPExceptionForInstruction(const PPCAnalyst::CodeOp* op) const;
public: public:
explicit JitBase(Core::System& system); explicit JitBase(Core::System& system);