WC24PatchEngine: Resolve -Wshadow warning

While not captured, we're definitely shadowing the result variable
outside the lambda.
This commit is contained in:
Lioncash 2023-12-12 17:03:39 -05:00
parent 81d5370141
commit 79c84c98ed
1 changed files with 2 additions and 2 deletions

View File

@ -116,8 +116,8 @@ void Reload()
std::optional<std::string> GetNetworkPatch(const std::string& source, IsKD is_kd) std::optional<std::string> GetNetworkPatch(const std::string& source, IsKD is_kd)
{ {
const auto patch = const auto patch =
std::find_if(s_patches.begin(), s_patches.end(), [&source, &is_kd](NetworkPatch& patch) { std::find_if(s_patches.begin(), s_patches.end(), [&source, &is_kd](const NetworkPatch& p) {
return patch.source == source && patch.is_kd == is_kd && patch.enabled; return p.source == source && p.is_kd == is_kd && p.enabled;
}); });
if (patch == s_patches.end()) if (patch == s_patches.end())
return std::nullopt; return std::nullopt;