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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user