mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 21:58:48 +00: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:
parent
6ca7e2856b
commit
e4fb837f4b
24 changed files with 60 additions and 72 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue