Codechange: Make FileToSaveLoad's title std::string and simplify assignments

This commit is contained in:
Rubidium
2023-04-16 21:44:53 +02:00
committed by rubidium42
parent f0a1ddd81c
commit ee723f26ba
6 changed files with 14 additions and 28 deletions

View File

@@ -3395,22 +3395,15 @@ void FileToSaveLoad::SetMode(SaveLoadOperation fop, AbstractFileType aft, Detail
this->abstract_ftype = aft;
}
/**
* Set the name of the file.
* @param name Name of the file.
*/
void FileToSaveLoad::SetName(const char *name)
{
this->name = name;
}
/**
* Set the title of the file.
* @param title Title of the file.
*/
void FileToSaveLoad::SetTitle(const char *title)
void FileToSaveLoad::Set(const FiosItem &item)
{
strecpy(this->title, title, lastof(this->title));
this->SetMode(item.type);
this->name = item.name;
this->title = item.title;
}
SaveLoadTable SaveLoadHandler::GetLoadDescription() const