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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user