1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-18 20:19:11 +00:00

(svn r15085) -Fix (r14164): Clearing a settings group did not delete old items nor reset the last_item pointer, causing lists to not be saved unless they started blank.

This commit is contained in:
2009-01-14 20:23:45 +00:00
parent 3cd6bf0ead
commit 7d70f0cd14
3 changed files with 16 additions and 7 deletions

View File

@@ -77,6 +77,13 @@ IniItem *IniGroup::GetItem(const char *name, bool create)
return new IniItem(this, name, len);
}
void IniGroup::Clear()
{
delete this->item;
this->item = NULL;
this->last_item = &this->item;
}
IniFile::IniFile(const char **list_group_names) : group(NULL), comment(NULL), list_group_names(list_group_names)
{
this->last_group = &this->group;