mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 06:27:43 +00:00
Runtime: Make use of std::make_unique where applicable
Makes use of the C++14 make_unique allocation function to allocate class instances where applicable instead of a reset with a new operator within it. This doesn't touch cases where buffers are allocated, given make_unique would zero-initialize them.
This commit is contained in:
@@ -14,7 +14,7 @@ CFire::CFire(TToken<CGenDescription> effect, TUniqueId uid, TAreaId aId, bool ac
|
||||
float f3, float f4)
|
||||
: CActor(uid, active, "Fire"sv, CEntityInfo(aId, NullConnectionList), xf, CModelData::CModelDataNull(),
|
||||
CMaterialList(EMaterialTypes::Projectile), CActorParameters::None(), owner)
|
||||
, xe8_(new CElementGen(effect))
|
||||
, xe8_(std::make_unique<CElementGen>(effect))
|
||||
, xec_ownerId(owner)
|
||||
, xf0_damageInfo(dInfo)
|
||||
, x10c_damageInfo(dInfo)
|
||||
|
||||
Reference in New Issue
Block a user