mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Modernize std::find_if
with ranges
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
This commit is contained in:
@ -170,10 +170,9 @@ bool ResourcePack::Install(const std::string& path)
|
||||
continue;
|
||||
const std::string texture_name = texture_zip_path.substr(texture_zip_path_prefix.size());
|
||||
|
||||
auto texture_it = std::find_if(
|
||||
m_textures.cbegin(), m_textures.cend(), [&texture_name](const std::string& texture) {
|
||||
return mz_path_compare_wc(texture.c_str(), texture_name.c_str(), 1) == MZ_OK;
|
||||
});
|
||||
auto texture_it = std::ranges::find_if(m_textures, [&texture_name](const std::string& texture) {
|
||||
return mz_path_compare_wc(texture.c_str(), texture_name.c_str(), 1) == MZ_OK;
|
||||
});
|
||||
if (texture_it == m_textures.cend())
|
||||
continue;
|
||||
const auto texture = *texture_it;
|
||||
|
Reference in New Issue
Block a user