2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-11 20:24:01 +00:00

RetroDataSpec: Make use of make_unique where applicable

Same behavior, but without a mildly wonky way of performing it.
This commit is contained in:
Lioncash
2020-03-31 12:50:26 -04:00
parent 53694481e5
commit 9ef2fbba5a
9 changed files with 82 additions and 77 deletions

View File

@@ -12,19 +12,19 @@ void MaterialSet::Material::SectionFactory::Enumerate<BigDNA::Read>(typename Rea
type.read(reader);
switch (ISection::Type(type.toUint32())) {
case ISection::Type::PASS:
section.reset(new struct SectionPASS);
section = std::make_unique<SectionPASS>();
section->read(reader);
break;
case ISection::Type::CLR:
section.reset(new struct SectionCLR);
section = std::make_unique<SectionCLR>();
section->read(reader);
break;
case ISection::Type::INT:
section.reset(new struct SectionINT);
section = std::make_unique<SectionINT>();
section->read(reader);
break;
default:
section.reset(nullptr);
section.reset();
break;
}
}