Codechange: Add CreateGroup/CreateItem methods for ini files.
This abstracts the internals a bit.
This commit is contained in:

committed by
Peter Nelson

parent
0c85ce29ea
commit
d3c5ae2648
@@ -1121,8 +1121,7 @@ static void AISaveConfig(IniFile &ini, const char *grpname)
|
||||
name = "none";
|
||||
}
|
||||
|
||||
IniItem *item = new IniItem(group, name);
|
||||
item->SetValue(value);
|
||||
group->CreateItem(name).SetValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1143,8 +1142,7 @@ static void GameSaveConfig(IniFile &ini, const char *grpname)
|
||||
name = "none";
|
||||
}
|
||||
|
||||
IniItem *item = new IniItem(group, name);
|
||||
item->SetValue(value);
|
||||
group->CreateItem(name).SetValue(value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user