From fecfb14f3518180b3114df83419791bc53239ef2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 25 May 2020 22:20:02 -0400 Subject: [PATCH] CBodyState: Make references const where applicable The referenced objects aren't modified --- Runtime/Character/CBodyState.cpp | 4 ++-- Runtime/Character/CBodyState.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/Character/CBodyState.cpp b/Runtime/Character/CBodyState.cpp index 20a1703d9..8cf4d043d 100644 --- a/Runtime/Character/CBodyState.cpp +++ b/Runtime/Character/CBodyState.cpp @@ -1173,7 +1173,7 @@ void CBSHurled::PlayLandAnimation(CBodyController& bc, CStateManager& mgr) { } } -bool CBSHurled::ShouldStartStrikeWall(CBodyController& bc) const { +bool CBSHurled::ShouldStartStrikeWall(const CBodyController& bc) const { if (const TCastToConstPtr ai = bc.GetOwner()) { if (ai->MadeSolidCollision()) { if (!ai->IsOnGround()) { @@ -1184,7 +1184,7 @@ bool CBSHurled::ShouldStartStrikeWall(CBodyController& bc) const { return false; } -bool CBSHurled::ShouldStartLand(float dt, CBodyController& bc) const { +bool CBSHurled::ShouldStartLand(float dt, const CBodyController& bc) const { bool ret = true; if (const TCastToConstPtr ai = bc.GetOwner()) { ret = false; diff --git a/Runtime/Character/CBodyState.hpp b/Runtime/Character/CBodyState.hpp index 738aee8ab..0a82ea638 100644 --- a/Runtime/Character/CBodyState.hpp +++ b/Runtime/Character/CBodyState.hpp @@ -235,8 +235,8 @@ class CBSHurled : public CBodyState { void Recover(CStateManager& mgr, CBodyController& bc, pas::EHurledState state); void PlayStrikeWallAnimation(CBodyController& bc, CStateManager& mgr); void PlayLandAnimation(CBodyController& bc, CStateManager& mgr); - bool ShouldStartStrikeWall(CBodyController& bc) const; - bool ShouldStartLand(float dt, CBodyController& bc) const; + bool ShouldStartStrikeWall(const CBodyController& bc) const; + bool ShouldStartLand(float dt, const CBodyController& bc) const; public: CBSHurled() = default;