diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.cpp index 76d1ad6af6..ef71ba6eb8 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.cpp @@ -330,8 +330,3 @@ void GraphicsModConfig::DeserializeFromProfile(const picojson::object& obj) } } } - -bool GraphicsModConfig::operator<(const GraphicsModConfig& other) const -{ - return m_weight < other.m_weight; -} diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.h b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.h index fd35b963dd..f845c612ad 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.h +++ b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsMod.h @@ -43,6 +43,4 @@ struct GraphicsModConfig void SerializeToProfile(picojson::object* value) const; void DeserializeFromProfile(const picojson::object& value); - - bool operator<(const GraphicsModConfig& other) const; }; diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.cpp index 5fa2c011b6..3c234e9ec1 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.cpp @@ -111,7 +111,7 @@ void GraphicsModGroupConfig::Load() try_add_mod(graphics_mod_directory, GraphicsModConfig::Source::System); } - std::sort(m_graphics_mods.begin(), m_graphics_mods.end()); + std::ranges::sort(m_graphics_mods, {}, &GraphicsModConfig::m_weight); for (auto& mod : m_graphics_mods) { m_path_to_graphics_mod[mod.GetAbsolutePath()] = &mod;