CPathFindSearch: Eliminate variable shadowing

This commit is contained in:
Lioncash 2020-04-23 07:19:41 -04:00
parent 078acce378
commit 9ec9f42457
1 changed files with 2 additions and 2 deletions

View File

@ -315,8 +315,8 @@ bool CPathFindSearch::Search(rstl::reserved_vector<CPFRegion*, 4>& regs1, const
} else {
/* Compute next heuristic */
x0_area->ClosedSet().Rmv(linkReg->GetIndex());
float h = (p2 - linkReg->GetCentroid()).magnitude();
linkReg->Data()->Setup(reg, g, h);
const float nextHeuristic = (p2 - linkReg->GetCentroid()).magnitude();
linkReg->Data()->Setup(reg, g, nextHeuristic);
}
/* Make next potential candidate */