summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 70a753931a..57c07f7675 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -1665,11 +1665,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();