summaryrefslogtreecommitdiff
path: root/scene/resources/navigation_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/navigation_mesh.cpp')
-rw-r--r--scene/resources/navigation_mesh.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index d2be2bdba1..d679a17c15 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -329,9 +329,7 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
Vector3 *tw = tmeshfaces.ptrw();
int tidx = 0;
- for (List<Face3>::Element *E = faces.front(); E; E = E->next()) {
- const Face3 &f = E->get();
-
+ for (Face3 &f : faces) {
for (int j = 0; j < 3; j++) {
tw[tidx++] = f.vertex[j];
_EdgeKey ek;
@@ -366,8 +364,8 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
{
Vector3 *w = varr.ptrw();
int idx = 0;
- for (List<Vector3>::Element *E = lines.front(); E; E = E->next()) {
- w[idx++] = E->get();
+ for (Vector3 &E : lines) {
+ w[idx++] = E;
}
}