mirror of https://github.com/OpenTTD/OpenTTD
Codefix: std::optional<const std::string> is weird; why is modifying the string copy not allowed?
parent
e9609e4558
commit
7f674b09a4
|
@ -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());
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue