2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 23:47:44 +00:00

General: Mark a handful of deduced const variables as const explicitly

Same behavior, but makes it explicit to the reader that these are const.

Prevents cases where the reader might assume that just because the
variable isn't const qualified that it must be mutable, when it actually
isn't.
This commit is contained in:
Lioncash
2020-05-08 18:41:27 -04:00
parent 6658be66c2
commit 5d209c8dc8
12 changed files with 47 additions and 35 deletions

View File

@@ -53,11 +53,12 @@ void CWallWalker::AlignToFloor(CStateManager& mgr, float radius, const zeus::CVe
zeus::CAABox aabb(newPos - margin, newPos + margin);
CAreaCollisionCache ccache(aabb);
CGameCollision::BuildAreaCollisionCache(mgr, ccache);
if (x5d6_25_hasAlignSurface)
if (x5d6_25_hasAlignSurface) {
x5d6_25_hasAlignSurface = PointOnSurface(x568_alignNormal, newPos);
}
if (!x5d6_25_hasAlignSurface || !(x5d4_thinkCounter & 0x3)) {
for (auto& leaf : ccache) {
for (auto& node : leaf) {
for (const auto& leaf : ccache) {
for (const auto& node : leaf) {
CAreaOctTree::TriListReference triArr = node.GetTriangleArray();
for (u16 i = 0; i < triArr.GetSize(); ++i) {
u16 triIdx = triArr.GetAt(i);