From a1879ea09991158ba99f76275292db8fd4bcc026 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 31 Jan 2024 12:05:15 -0500 Subject: GraphicsModGroup: Allow heterogenous lookup for GetMod() Allows using keys that aren't directly std::string as the key. This lets us use std::string_view for the incoming path name, making it more flexible with other string types. --- .../Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h') diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h index 9614951e96..b2178db3f6 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h +++ b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h @@ -5,10 +5,9 @@ #include #include +#include #include -#include - #include "Common/CommonTypes.h" struct GraphicsModConfig; @@ -34,7 +33,7 @@ public: const std::vector& GetMods() const; std::vector& GetMods(); - GraphicsModConfig* GetMod(const std::string& absolute_path) const; + GraphicsModConfig* GetMod(std::string_view absolute_path) const; const std::string& GetGameID() const; @@ -42,6 +41,6 @@ private: std::string GetPath() const; std::string m_game_id; std::vector m_graphics_mods; - std::map m_path_to_graphics_mod; + std::map> m_path_to_graphics_mod; u32 m_change_count = 0; }; -- cgit v1.2.3