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

@@ -277,6 +277,7 @@ HotkeyList::~HotkeyList()
void HotkeyList::Load(IniFile &ini)
{
IniGroup *group = ini.GetGroup(this->ini_group);
if (group == nullptr) return;
for (Hotkey &hotkey : this->items) {
IniItem *item = group->GetItem(hotkey.name);
if (item != nullptr) {