From 88431cfbca00495f597418d87384efe8e440b628 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 14 Dec 2023 14:18:38 -0500 Subject: [PATCH] WC24PatchEngine: Make GetNetworkPatch() take a std::string_view Makes it consistent with GetNetworkPatchByPayload() --- Source/Core/Core/WC24PatchEngine.cpp | 2 +- Source/Core/Core/WC24PatchEngine.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/WC24PatchEngine.cpp b/Source/Core/Core/WC24PatchEngine.cpp index a1c5532fa1..7a9b5a25ff 100644 --- a/Source/Core/Core/WC24PatchEngine.cpp +++ b/Source/Core/Core/WC24PatchEngine.cpp @@ -115,7 +115,7 @@ void Reload() LoadPatches(); } -std::optional GetNetworkPatch(const std::string& source, IsKD is_kd) +std::optional 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) { diff --git a/Source/Core/Core/WC24PatchEngine.h b/Source/Core/Core/WC24PatchEngine.h index 5f9c78da4c..5e019a67a1 100644 --- a/Source/Core/Core/WC24PatchEngine.h +++ b/Source/Core/Core/WC24PatchEngine.h @@ -21,6 +21,6 @@ struct NetworkPatch final void Reload(); -std::optional GetNetworkPatch(const std::string& source, IsKD is_kd); +std::optional GetNetworkPatch(std::string_view source, IsKD is_kd); std::optional GetNetworkPatchByPayload(std::string_view source); } // namespace WC24PatchEngine