Merge pull request #362 from PhazonJim/bugfix/Xcode-build-error-loop-variable-copy

Bugfix: Xcode build "loop variable <X> is always a copy " error fix
This commit is contained in:
Luke Street 2020-12-21 11:11:19 -05:00 committed by GitHub
commit f06ec91fa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ void CMetroidPrimeRelay::GetOrBuildMetroidPrimeExo(CStateManager& mgr) {
return; return;
} }
for (const auto& act : mgr.GetPhysicsActorObjectList()) { for (const auto act : mgr.GetPhysicsActorObjectList()) {
if (CPatterned::CastTo<CMetroidPrimeExo>(act) != nullptr) { if (CPatterned::CastTo<CMetroidPrimeExo>(act) != nullptr) {
return; return;
} }

View File

@ -116,7 +116,7 @@ void CScriptMazeNode::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, C
} }
} }
} }
for (const auto& ent : mgr.GetAllObjectList()) { for (const auto ent : mgr.GetAllObjectList()) {
if (TCastToPtr<CScriptMazeNode> node = ent) { if (TCastToPtr<CScriptMazeNode> node = ent) {
if (node->xe8_col == xe8_col - 1 && node->xec_row == xec_row && node->xf0_side == ESide::Right) { if (node->xe8_col == xe8_col - 1 && node->xec_row == xec_row && node->xf0_side == ESide::Right) {
auto& cell = maze->GetCell(xe8_col - 1, xec_row); auto& cell = maze->GetCell(xe8_col - 1, xec_row);