summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2026-04-18 21:02:30 +0200
committerGitHub <noreply@github.com>2026-04-18 21:02:30 +0200
commit74bb80544e8776750ee918fd4574a5b8eefd9774 (patch)
tree5ffec7ba44c2ef6f51e5f48fd4ba95c6fed51d09 /Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp
parent5f2641ba4df22eeaa4357981f9a0e7fc54e43f3a (diff)
parent95dec132030e72b74da6bc46966e4fe5e4e239c0 (diff)
Merge pull request #14565 from SuperSamus/cpp-argument-move-reference
Improve usage of std::move and const references parameters
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp')
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp
index 5f9cf48d52..c49b655804 100644
--- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp
@@ -247,23 +247,22 @@ void GraphicsModManager::Load(const GraphicsModGroupConfig& config)
}
}
+ const auto create_action =
+ [filesystem_library = std::move(filesystem_library)](
+ const std::string_view& action_name, const picojson::value& json_data,
+ GraphicsModConfig mod_config) -> std::unique_ptr<GraphicsModAction> {
+ auto action = GraphicsModActionFactory::Create(action_name, json_data, filesystem_library);
+ if (action == nullptr)
+ {
+ return nullptr;
+ }
+ return std::make_unique<DecoratedAction>(std::move(action), std::move(mod_config));
+ };
+
for (const auto& mod : mods)
{
for (const GraphicsModFeatureConfig& feature : mod.m_features)
{
- const auto create_action =
- [filesystem_library](const std::string_view& action_name,
- const picojson::value& json_data,
- GraphicsModConfig mod_config) -> std::unique_ptr<GraphicsModAction> {
- auto action =
- GraphicsModActionFactory::Create(action_name, json_data, std::move(filesystem_library));
- if (action == nullptr)
- {
- return nullptr;
- }
- return std::make_unique<DecoratedAction>(std::move(action), std::move(mod_config));
- };
-
const auto internal_group = fmt::format("{}.{}", mod.m_title, feature.m_group);
const auto add_target = [&](const GraphicsTargetConfig& target) {