| 20 | #include "../safeguards.h" |
| 21 | |
| 22 | void ScriptConfig::Change(std::optional<std::string_view> name, int version, bool force_exact_match) |
| 23 | { |
| 24 | if (name.has_value()) { |
| 25 | this->name = name.value(); |
| 26 | this->info = this->FindInfo(this->name, version, force_exact_match); |
| 27 | } else { |
| 28 | this->info = nullptr; |
| 29 | } |
| 30 | this->version = (info == nullptr) ? -1 : info->GetVersion(); |
| 31 | this->config_list.reset(); |
| 32 | this->to_load_data.reset(); |
| 33 | |
| 34 | this->ClearConfigList(); |
| 35 | } |
| 36 | |
| 37 | ScriptConfig::ScriptConfig(const ScriptConfig &config) |
| 38 | { |
no test coverage detected