1
0
Fork 0

Codefix: std::optional<const std::string> is weird; why is modifying the string copy not allowed?

pull/13702/head
Rubidium 2025-03-02 19:24:23 +01:00 committed by rubidium42
parent e9609e4558
commit 7f674b09a4
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
#include "../safeguards.h"
void ScriptConfig::Change(std::optional<const std::string> name, int version, bool force_exact_match)
void ScriptConfig::Change(std::optional<std::string> name, int version, bool force_exact_match)
{
if (name.has_value()) {
this->name = std::move(name.value());

View File

@ -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<const std::string> name, int version = -1, bool force_exact_match = false);
void Change(std::optional<std::string> name, int version = -1, bool force_exact_match = false);
/**
* Get the ScriptInfo linked to this ScriptConfig.