Codechange: Use std::unique_ptr for ai/game config.
This commit is contained in:
committed by
Peter Nelson
parent
7f3820fa7e
commit
422ff9dbd8
@@ -35,14 +35,14 @@ void ScriptConfig::Change(std::optional<std::string> name, int version, bool for
|
||||
this->ClearConfigList();
|
||||
}
|
||||
|
||||
ScriptConfig::ScriptConfig(const ScriptConfig *config)
|
||||
ScriptConfig::ScriptConfig(const ScriptConfig &config)
|
||||
{
|
||||
this->name = config->name;
|
||||
this->info = config->info;
|
||||
this->version = config->version;
|
||||
this->name = config.name;
|
||||
this->info = config.info;
|
||||
this->version = config.version;
|
||||
this->to_load_data.reset();
|
||||
|
||||
for (const auto &item : config->settings) {
|
||||
for (const auto &item : config.settings) {
|
||||
this->settings[item.first] = item.second;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user