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:
@@ -24,7 +24,7 @@ CPowerBomb::CPowerBomb(const TToken<CGenDescription>& particle, TUniqueId uid, T
|
||||
, x158_24_canStartFilter(true)
|
||||
, x158_25_filterEnabled(false)
|
||||
, x164_radiusIncrement(dInfo.GetRadius() / 2.5f)
|
||||
, x168_particle(new CElementGen(particle))
|
||||
, x168_particle(std::make_unique<CElementGen>(particle))
|
||||
, x16c_radius(dInfo.GetRadius()) {
|
||||
x168_particle->SetGlobalTranslation(GetTranslation());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user