Codechange: Remove create parameter from IniLoadFile::GetGroup.

GetGroup now only returns nullptr if the group does not exist.
Use GetOrCreateGroup to create a group.

This avoids creating groups while reading ini files.
This commit is contained in:
Peter Nelson
2023-10-10 19:25:59 +01:00
committed by Peter Nelson
parent c47a0e1578
commit 1fecbeff76
8 changed files with 37 additions and 30 deletions

View File

@@ -352,6 +352,7 @@ bool GraphicsSet::FillSetDetails(IniFile &ini, const std::string &path, const st
bool ret = this->BaseSet<GraphicsSet, MAX_GFT, true>::FillSetDetails(ini, path, full_filename, false);
if (ret) {
IniGroup *metadata = ini.GetGroup("metadata");
assert(metadata != nullptr); /* ret can't be true if metadata isn't present. */
IniItem *item;
fetch_metadata("palette");