diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.cpp index a82949bf6e..19cd2b0f32 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.cpp @@ -88,7 +88,7 @@ u32 Arm64RegCache::GetUnlockedRegisterCount() const void Arm64RegCache::LockRegister(ARM64Reg host_reg) { - auto reg = std::find(m_host_registers.begin(), m_host_registers.end(), host_reg); + auto reg = std::ranges::find(m_host_registers, host_reg, &HostReg::GetReg); ASSERT_MSG(DYNA_REC, reg != m_host_registers.end(), "Don't try locking a register that isn't in the cache. Reg {}", static_cast(host_reg)); @@ -97,7 +97,7 @@ void Arm64RegCache::LockRegister(ARM64Reg host_reg) void Arm64RegCache::UnlockRegister(ARM64Reg host_reg) { - auto reg = std::find(m_host_registers.begin(), m_host_registers.end(), host_reg); + auto reg = std::ranges::find(m_host_registers, host_reg, &HostReg::GetReg); ASSERT_MSG(DYNA_REC, reg != m_host_registers.end(), "Don't try unlocking a register that isn't in the cache. Reg {}", static_cast(host_reg)); diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h b/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h index 5e2b4c1f36..dcdcb14a5d 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h @@ -150,8 +150,6 @@ public: void Unlock() { m_locked = false; } Arm64Gen::ARM64Reg GetReg() const { return m_reg; } - bool operator==(Arm64Gen::ARM64Reg reg) const { return reg == m_reg; } - private: Arm64Gen::ARM64Reg m_reg = Arm64Gen::ARM64Reg::INVALID_REG; bool m_locked = false;