CBodyState: Make references const where applicable

The referenced objects aren't modified
This commit is contained in:
Lioncash 2020-05-25 22:20:02 -04:00
parent 8690f4ef3e
commit fecfb14f35
2 changed files with 4 additions and 4 deletions

View File

@ -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<CPatterned> 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<CPatterned> ai = bc.GetOwner()) {
ret = false;

View File

@ -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;