Modernize std::none_of with ranges and projections

This commit is contained in:
mitaclaw 2024-09-30 15:06:25 -07:00
parent 3536e287e0
commit 940009a645

View File

@ -521,10 +521,9 @@ void RegCache::BindToRegister(preg_t i, bool doLoad, bool makeDirty)
}
ASSERT_MSG(DYNA_REC,
std::none_of(m_regs.begin(), m_regs.end(),
[xr](const auto& r) {
return r.Location().has_value() && r.Location()->IsSimpleReg(xr);
}),
std::ranges::none_of(
m_regs, [xr](const auto& l) { return l.has_value() && l->IsSimpleReg(xr); },
&PPCCachedReg::Location),
"Xreg {} already bound", Common::ToUnderlying(xr));
m_regs[i].SetBoundTo(xr);