mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:44:56 +00:00
Runtime: Resolve -Wrange-loop-analysis warnings (part 2)
This commit is contained in:
@@ -43,7 +43,7 @@ CAuxWeapon::CAuxWeapon(TUniqueId playerId)
|
||||
}
|
||||
|
||||
void CAuxWeapon::InitComboData() {
|
||||
for (const auto comboName : skComboNames) {
|
||||
for (const auto& comboName : skComboNames) {
|
||||
x28_combos.push_back(g_SimplePool->GetObj(comboName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ CRayCastResult CFlameThrower::DoCollisionCheck(TUniqueId& idOut, const zeus::CAA
|
||||
lookXf.origin = delta * 0.5f + colPoints[i - 1];
|
||||
const zeus::COBBox obb(lookXf, {curRadius, delta.magnitude() * 0.5f, curRadius});
|
||||
|
||||
for (const TUniqueId id : nearList) {
|
||||
for (const auto& id : nearList) {
|
||||
if (auto* act = static_cast<CActor*>(mgr.ObjectById(id))) {
|
||||
const CProjectileTouchResult tres = CanCollideWith(*act, mgr);
|
||||
if (tres.GetActorId() == kInvalidUniqueId) {
|
||||
|
||||
@@ -200,7 +200,7 @@ void CPlayerGun::InitBombData() {
|
||||
}
|
||||
|
||||
void CPlayerGun::InitMuzzleData() {
|
||||
for (const auto muzzleID : g_tweakGunRes->xa4_auxMuzzle) {
|
||||
for (const auto& muzzleID : g_tweakGunRes->xa4_auxMuzzle) {
|
||||
x7c0_auxMuzzleEffects.push_back(g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), muzzleID}));
|
||||
x800_auxMuzzleGenerators.emplace_back(std::make_unique<CElementGen>(x7c0_auxMuzzleEffects.back()));
|
||||
x800_auxMuzzleGenerators.back()->SetParticleEmission(false);
|
||||
|
||||
Reference in New Issue
Block a user