From ac3322b0af8f23e8e2dac8111200bc69b5604c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 24 Jul 2021 15:46:25 +0200 Subject: Use const references where possible for List range iterators --- scene/resources/navigation_mesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/resources/navigation_mesh.cpp') diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp index d679a17c15..ddc50c0490 100644 --- a/scene/resources/navigation_mesh.cpp +++ b/scene/resources/navigation_mesh.cpp @@ -329,7 +329,7 @@ Ref NavigationMesh::get_debug_mesh() { Vector3 *tw = tmeshfaces.ptrw(); int tidx = 0; - for (Face3 &f : faces) { + for (const Face3 &f : faces) { for (int j = 0; j < 3; j++) { tw[tidx++] = f.vertex[j]; _EdgeKey ek; @@ -364,7 +364,7 @@ Ref NavigationMesh::get_debug_mesh() { { Vector3 *w = varr.ptrw(); int idx = 0; - for (Vector3 &E : lines) { + for (const Vector3 &E : lines) { w[idx++] = E; } } -- cgit v1.2.3