Codechange: Pass ini file by reference and prefer automatic storage.

This avoids new/delete operations, and (not) checking for nullptr.
This commit is contained in:
Peter Nelson
2023-10-10 19:25:56 +01:00
committed by Peter Nelson
parent 3961318974
commit 0c85ce29ea
7 changed files with 40 additions and 53 deletions

View File

@@ -347,11 +347,11 @@ void GfxLoadSprites()
UpdateCursorSize();
}
bool GraphicsSet::FillSetDetails(IniFile *ini, const std::string &path, const std::string &full_filename)
bool GraphicsSet::FillSetDetails(IniFile &ini, const std::string &path, const std::string &full_filename)
{
bool ret = this->BaseSet<GraphicsSet, MAX_GFT, true>::FillSetDetails(ini, path, full_filename, false);
if (ret) {
IniGroup *metadata = ini->GetGroup("metadata");
IniGroup *metadata = ini.GetGroup("metadata");
IniItem *item;
fetch_metadata("palette");