Codechange: Use std::string in INI file parsing.

This commit is contained in:
Michael Lutz
2020-05-17 23:32:03 +02:00
parent 8aef14386f
commit 715aa67a9c
11 changed files with 179 additions and 168 deletions

View File

@@ -356,11 +356,11 @@ bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path, const char *ful
IniItem *item;
fetch_metadata("palette");
this->palette = (*item->value == 'D' || *item->value == 'd') ? PAL_DOS : PAL_WINDOWS;
this->palette = (item->value.value()[0] == 'D' || item->value.value()[0] == 'd') ? PAL_DOS : PAL_WINDOWS;
/* Get optional blitter information. */
item = metadata->GetItem("blitter", false);
this->blitter = (item != nullptr && *item->value == '3') ? BLT_32BPP : BLT_8BPP;
this->blitter = (item != nullptr && item->value.value()[0] == '3') ? BLT_32BPP : BLT_8BPP;
}
return ret;
}