Codechange: Make FileToSaveLoad's title std::string and simplify assignments
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user