2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-13 11:25:53 +00:00

CCharLayoutInfo: Make use of const where applicable

Makes trivial variables const to make it explicit that they aren't
modified.
This commit is contained in:
Lioncash 2019-10-26 21:21:55 -04:00
parent 293d19cf13
commit 9193f4c4d7

View File

@ -32,16 +32,18 @@ void CCharLayoutNode::Bone::read(CInputStream& in) {
x0_parentId = CSegId(in); x0_parentId = CSegId(in);
x4_origin.readBig(in); x4_origin.readBig(in);
u32 chCount = in.readUint32Big(); const u32 chCount = in.readUint32Big();
x10_children.reserve(chCount); x10_children.reserve(chCount);
for (u32 i = 0; i < chCount; ++i) for (u32 i = 0; i < chCount; ++i) {
x10_children.emplace_back(in); x10_children.emplace_back(in);
}
} }
CCharLayoutNode::CCharLayoutNode(CInputStream& in) : x0_boneMap(in.readUint32Big()) { CCharLayoutNode::CCharLayoutNode(CInputStream& in) : x0_boneMap(in.readUint32Big()) {
u32 cap = x0_boneMap.GetCapacity(); const u32 cap = x0_boneMap.GetCapacity();
for (u32 i = 0; i < cap; ++i) { for (u32 i = 0; i < cap; ++i) {
u32 thisId = in.readUint32Big(); const u32 thisId = in.readUint32Big();
Bone& bone = x0_boneMap[thisId]; Bone& bone = x0_boneMap[thisId];
bone.read(in); bone.read(in);
} }