diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 415dc4af99..2d798ce7ff 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -1538,9 +1538,7 @@ void NetPlayClient::DisplayPlayersPing() u32 NetPlayClient::GetPlayersMaxPing() const { - return std::max_element( - m_players.begin(), m_players.end(), - [](const auto& a, const auto& b) { return a.second.ping < b.second.ping; }) + return std::ranges::max_element(m_players, {}, [](const auto& kv) { return kv.second.ping; }) ->second.ping; } diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 5ae7d6c059..6fc146e086 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1667,11 +1667,8 @@ RcTcacheEntry TextureCacheBase::CreateTextureEntry( if (!assets_data.empty()) { const auto calculate_max_levels = [&]() { - const auto max_element = std::max_element( - assets_data.begin(), assets_data.end(), [](const auto& lhs, const auto& rhs) { - return lhs->m_texture.m_slices[0].m_levels.size() < - rhs->m_texture.m_slices[0].m_levels.size(); - }); + const auto max_element = std::ranges::max_element( + assets_data, {}, [](const auto& v) { return v->m_texture.m_slices[0].m_levels.size(); }); return (*max_element)->m_texture.m_slices[0].m_levels.size(); }; const u32 texLevels = no_mips ? 1 : (u32)calculate_max_levels();