diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-30 17:26:50 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-12-15 19:54:16 -0800 |
| commit | 140252ffc0ae71e8b5309bff7d6550189c602702 (patch) | |
| tree | 7e6fe317fc93e0d9fc91e089ec3af86af25565f1 /Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp | |
| parent | 860e6cf5cb7d96499aecf6f6067783bdb71c29ad (diff) | |
Modernize `std::any_of` with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.
In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
Diffstat (limited to 'Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp index 4446f602e8..887875d2cb 100644 --- a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp +++ b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.cpp @@ -69,10 +69,8 @@ CustomAssetLibrary::LoadInfo CustomAssetLibrary::LoadGameTexture(const AssetID& } // All levels have to have the same format. - if (std::any_of(slice.m_levels.begin(), slice.m_levels.end(), - [&first_mip](const VideoCommon::CustomTextureData::ArraySlice::Level& l) { - return l.format != first_mip.format; - })) + if (std::ranges::any_of(slice.m_levels, + [&first_mip](const auto& l) { return l.format != first_mip.format; })) { ERROR_LOG_FMT( VIDEO, "Custom game texture {} has inconsistent formats across mip levels for slice {}.", |
