mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07: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:
@@ -117,10 +117,9 @@ void Reload()
|
||||
|
||||
std::optional<std::string> GetNetworkPatch(std::string_view source, IsKD is_kd)
|
||||
{
|
||||
const auto patch =
|
||||
std::find_if(s_patches.begin(), s_patches.end(), [&source, &is_kd](const NetworkPatch& p) {
|
||||
return p.source == source && p.is_kd == is_kd && p.enabled;
|
||||
});
|
||||
const auto patch = std::ranges::find_if(s_patches, [&source, &is_kd](const NetworkPatch& p) {
|
||||
return p.source == source && p.is_kd == is_kd && p.enabled;
|
||||
});
|
||||
if (patch == s_patches.end())
|
||||
return std::nullopt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user