Codechange: use std::optional<std::string> for changing the script over char *

This commit is contained in:
Rubidium
2023-05-05 21:59:50 +02:00
committed by rubidium42
parent 0fd9eb0faa
commit 9f2fc860ad
9 changed files with 25 additions and 21 deletions

View File

@@ -373,7 +373,7 @@ void MakeNewgameSettingsLive()
if (_settings_newgame.ai_config[c] != nullptr) {
_settings_game.ai_config[c] = new AIConfig(_settings_newgame.ai_config[c]);
if (!AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->HasScript()) {
AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->Change(nullptr);
AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->Change(std::nullopt);
}
}
}