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

RuntimeCommon: Const qualify auto references where source is const

Marks references that would be deduced as const automatically with const
to be explicit to the reader.
This commit is contained in:
Lioncash
2020-05-12 20:25:30 -04:00
parent 8e77d6175c
commit 4b5074b298
9 changed files with 61 additions and 50 deletions

View File

@@ -27,12 +27,13 @@ void CMetaAnimRandom::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
std::shared_ptr<CAnimTreeNode> CMetaAnimRandom::VGetAnimationTree(const CAnimSysContext& animSys,
const CMetaAnimTreeBuildOrders& orders) const {
u32 r = animSys.x8_random->Range(1, 100);
const u32 r = animSys.x8_random->Range(1, 100);
const std::pair<std::shared_ptr<IMetaAnim>, u32>* useRd = nullptr;
for (auto& rd : x4_randomData) {
for (const auto& rd : x4_randomData) {
useRd = &rd;
if (r <= rd.second)
if (r <= rd.second) {
break;
}
}
return useRd->first->GetAnimationTree(animSys, orders);