mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
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.
This commit is contained in:
@ -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 {}.",
|
||||
|
Reference in New Issue
Block a user