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

@@ -172,7 +172,7 @@ struct ScriptListWindow : public Window {
void ChangeScript()
{
if (this->selected == -1) {
GetConfig(slot)->Change(nullptr);
GetConfig(slot)->Change(std::nullopt);
} else {
ScriptInfoList::const_iterator it = this->info_list->cbegin();
std::advance(it, this->selected);