Codechange: Add CreateGroup/CreateItem methods for ini files.

This abstracts the internals a bit.
This commit is contained in:
Peter Nelson
2023-10-10 19:25:57 +01:00
committed by Peter Nelson
parent 0c85ce29ea
commit d3c5ae2648
3 changed files with 32 additions and 12 deletions

View File

@@ -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);
}
/**