mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-15 07:26:10 +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:
@@ -76,7 +76,8 @@ void CSpankWeed::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState
|
||||
joints.push_back(CJointCollisionDescription::SphereCollision(id, joint.radius, joint.name, 0.001f));
|
||||
}
|
||||
|
||||
x594_collisionMgr.reset(new CCollisionActorManager(mgr, GetUniqueId(), GetAreaIdAlways(), joints, GetActive()));
|
||||
x594_collisionMgr =
|
||||
std::make_unique<CCollisionActorManager>(mgr, GetUniqueId(), GetAreaIdAlways(), joints, GetActive());
|
||||
CMaterialList list;
|
||||
list.Add(EMaterialTypes::CameraPassthrough);
|
||||
list.Add(EMaterialTypes::Immovable);
|
||||
|
||||
Reference in New Issue
Block a user