From f622ed364d1cc8468ef489e5990b0e3a031f395a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 9 Mar 2020 20:32:46 -0400 Subject: [PATCH] CPlayerCameraBob: Make use of std::array where applicable --- Runtime/World/CPlayerCameraBob.cpp | 2 +- Runtime/World/CPlayerCameraBob.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/World/CPlayerCameraBob.cpp b/Runtime/World/CPlayerCameraBob.cpp index c039bed5b..fb38d13e1 100644 --- a/Runtime/World/CPlayerCameraBob.cpp +++ b/Runtime/World/CPlayerCameraBob.cpp @@ -29,7 +29,7 @@ const float CPlayerCameraBob::kCameraDamping = 6.f * std::sqrt(80.f); CPlayerCameraBob::CPlayerCameraBob(ECameraBobType type, const zeus::CVector2f& vec, float bobPeriod) : x0_type(type), x4_vec(vec), xc_bobPeriod(bobPeriod) { - std::fill(std::begin(x7c_wanderPoints), std::end(x7c_wanderPoints), zeus::skForward); + x7c_wanderPoints.fill(zeus::skForward); } zeus::CTransform CPlayerCameraBob::GetViewWanderTransform() const { return xd0_viewWanderXf; } diff --git a/Runtime/World/CPlayerCameraBob.hpp b/Runtime/World/CPlayerCameraBob.hpp index 0ef07cde1..b0d3a1404 100644 --- a/Runtime/World/CPlayerCameraBob.hpp +++ b/Runtime/World/CPlayerCameraBob.hpp @@ -65,8 +65,8 @@ private: float x70_landingTranslation = 0.f; float x74_camVelocity = 0.f; float x78_camTranslation = 0.f; - zeus::CVector3f x7c_wanderPoints[4]; - float xb0_wanderPitches[4] = {}; + std::array x7c_wanderPoints; + std::array xb0_wanderPitches{}; float xc4_wanderTime = 0.f; float xc8_viewWanderSpeed = kViewWanderSpeedMin; u32 xcc_wanderIndex = 0;