Add -Wshadow=local to warnings and fix reported issues.

Fixes #25316.
This commit is contained in:
marxin
2019-02-12 21:10:08 +01:00
committed by Rémi Verschelde
parent 132e2f458d
commit 8d51618949
134 changed files with 1107 additions and 1110 deletions

View File

@@ -374,14 +374,14 @@ PoolVector<Vector3> AStar::get_point_path(int p_from_id, int p_to_id) {
{
PoolVector<Vector3>::Write w = path.write();
Point *p = end_point;
Point *p2 = end_point;
int idx = pc - 1;
while (p != begin_point) {
w[idx--] = p->pos;
p = p->prev_point;
while (p2 != begin_point) {
w[idx--] = p2->pos;
p2 = p2->prev_point;
}
w[0] = p->pos; // Assign first
w[0] = p2->pos; // Assign first
}
return path;