Merge pull request #13117 from mitaclaw/ranges-modernization-9-trivial-find

Ranges Algorithms Modernization - Find
This commit is contained in:
Tilka
2024-10-11 20:27:18 +01:00
committed by GitHub
32 changed files with 71 additions and 84 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ void Statistics::AddScissorRect()
}
else
{
add = std::find_if(scissors.begin(), scissors.end(), [&](auto& s) {
add = std::ranges::find_if(scissors, [&](auto& s) {
return s.Matches(scissor, show_scissors, show_viewports);
}) == scissors.end();
}
+1 -1
View File
@@ -2814,7 +2814,7 @@ TextureCacheBase::InvalidateTexture(TexAddrCache::iterator iter, bool discard_pe
// Xenoblade's sunset scene, where 35 copies are done per frame, and 25 of them are
// copied to the same address, and can be skipped.
ReleaseEFBCopyStagingTexture(std::move(entry->pending_efb_copy));
auto pending_it = std::find(m_pending_efb_copies.begin(), m_pending_efb_copies.end(), entry);
auto pending_it = std::ranges::find(m_pending_efb_copies, entry);
if (pending_it != m_pending_efb_copies.end())
m_pending_efb_copies.erase(pending_it);
}