2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 11:07:44 +00:00

RuntimeCommon: Use const on member functions where applicable

Adds missing const qualifiers on class member functions that don't
modify instance state.
This commit is contained in:
Lioncash
2019-08-14 06:04:11 -04:00
parent cf294db9eb
commit d3d629d405
91 changed files with 269 additions and 248 deletions

View File

@@ -47,7 +47,7 @@ CBodyStateInfo::CBodyStateInfo(CActor& actor, EBodyType type) {
x1c_additiveStates.push_back({pas::EAnimationState::AdditiveReaction, std::make_unique<CABSReaction>()});
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupRestrictedFlyerBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();
@@ -92,7 +92,7 @@ std::unique_ptr<CBodyState> CBodyStateInfo::SetupRestrictedFlyerBodyStates(int s
}
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupNewFlyerBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupNewFlyerBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();
@@ -137,7 +137,7 @@ std::unique_ptr<CBodyState> CBodyStateInfo::SetupNewFlyerBodyStates(int stateId,
}
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupWallWalkerBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupWallWalkerBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();
@@ -182,7 +182,7 @@ std::unique_ptr<CBodyState> CBodyStateInfo::SetupWallWalkerBodyStates(int stateI
}
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupPitchableBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupPitchableBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();
@@ -227,7 +227,7 @@ std::unique_ptr<CBodyState> CBodyStateInfo::SetupPitchableBodyStates(int stateId
}
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupFlyerBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupFlyerBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();
@@ -272,7 +272,7 @@ std::unique_ptr<CBodyState> CBodyStateInfo::SetupFlyerBodyStates(int stateId, CA
}
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupRestrictedBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupRestrictedBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();
@@ -319,7 +319,7 @@ std::unique_ptr<CBodyState> CBodyStateInfo::SetupRestrictedBodyStates(int stateI
}
}
std::unique_ptr<CBodyState> CBodyStateInfo::SetupBiPedalBodyStates(int stateId, CActor& actor) {
std::unique_ptr<CBodyState> CBodyStateInfo::SetupBiPedalBodyStates(int stateId, CActor& actor) const {
switch (stateId) {
case 0:
return std::make_unique<CBSFall>();