From 2f0d774ed8446a389cf7affc36a885e945444189 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 31 Mar 2020 05:32:06 -0400 Subject: [PATCH] General: Make use of emplace_back where applicable --- Runtime/Camera/CCinematicCamera.cpp | 10 +++++----- Runtime/Character/CBodyStateInfo.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Runtime/Camera/CCinematicCamera.cpp b/Runtime/Camera/CCinematicCamera.cpp index 505f2218e..fc98ad994 100644 --- a/Runtime/Camera/CCinematicCamera.cpp +++ b/Runtime/Camera/CCinematicCamera.cpp @@ -296,11 +296,11 @@ void CCinematicCamera::GenerateMoveOutofIntoPoints(bool outOfEye, CStateManager& behindDelta = -behindDelta; } for (int i = 0; i < 2; ++i) { - x188_viewPoints.push_back(behindPos); - x198_viewOrientations.push_back(q); - x1a8_viewPointArrivals.push_back(mgr.GetPlayer().GetUniqueId()); - x1b8_targets.push_back(eyePos); - x1c8_targetArrivals.push_back(kInvalidUniqueId); + x188_viewPoints.emplace_back(behindPos); + x198_viewOrientations.emplace_back(q); + x1a8_viewPointArrivals.emplace_back(mgr.GetPlayer().GetUniqueId()); + x1b8_targets.emplace_back(eyePos); + x1c8_targetArrivals.emplace_back(kInvalidUniqueId); behindPos += behindDelta; } CalculateMoveOutofIntoEyePosition(outOfEye, mgr); diff --git a/Runtime/Character/CBodyStateInfo.cpp b/Runtime/Character/CBodyStateInfo.cpp index 027a5891b..09325a628 100644 --- a/Runtime/Character/CBodyStateInfo.cpp +++ b/Runtime/Character/CBodyStateInfo.cpp @@ -42,10 +42,10 @@ CBodyStateInfo::CBodyStateInfo(CActor& actor, EBodyType type) { } x1c_additiveStates.reserve(4); - x1c_additiveStates.push_back({pas::EAnimationState::AdditiveIdle, std::make_unique()}); - x1c_additiveStates.push_back({pas::EAnimationState::AdditiveAim, std::make_unique()}); - x1c_additiveStates.push_back({pas::EAnimationState::AdditiveFlinch, std::make_unique()}); - x1c_additiveStates.push_back({pas::EAnimationState::AdditiveReaction, std::make_unique()}); + x1c_additiveStates.emplace_back(pas::EAnimationState::AdditiveIdle, std::make_unique()); + x1c_additiveStates.emplace_back(pas::EAnimationState::AdditiveAim, std::make_unique()); + x1c_additiveStates.emplace_back(pas::EAnimationState::AdditiveFlinch, std::make_unique()); + x1c_additiveStates.emplace_back(pas::EAnimationState::AdditiveReaction, std::make_unique()); } std::unique_ptr CBodyStateInfo::SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) const {