From 7f674b09a4a92ba9e81dbb039eaae642e4615b77 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 2 Mar 2025 19:24:23 +0100 Subject: [PATCH] Codefix: std::optional is weird; why is modifying the string copy not allowed? --- src/script/script_config.cpp | 2 +- src/script/script_config.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index 330c19da16..a18538a823 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -18,7 +18,7 @@ #include "../safeguards.h" -void ScriptConfig::Change(std::optional name, int version, bool force_exact_match) +void ScriptConfig::Change(std::optional name, int version, bool force_exact_match) { if (name.has_value()) { this->name = std::move(name.value()); diff --git a/src/script/script_config.hpp b/src/script/script_config.hpp index 83daa7b7cb..4822288d84 100644 --- a/src/script/script_config.hpp +++ b/src/script/script_config.hpp @@ -78,7 +78,7 @@ public: * @param force_exact_match If true try to find the exact same version * as specified. If false any compatible version is ok. */ - void Change(std::optional name, int version = -1, bool force_exact_match = false); + void Change(std::optional name, int version = -1, bool force_exact_match = false); /** * Get the ScriptInfo linked to this ScriptConfig.