summaryrefslogtreecommitdiffstats
path: root/scene/resources/navigation_mesh.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-07-24 15:46:25 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-07-25 12:22:25 +0200
commitac3322b0af8f23e8e2dac8111200bc69b5604c9f (patch)
tree59a079f13b5c03c2dd3328a26c55f3618e6014f6 /scene/resources/navigation_mesh.cpp
parenta0f7f42b842462646281f5c4c9a8db070e034adc (diff)
downloadredot-engine-ac3322b0af8f23e8e2dac8111200bc69b5604c9f.tar.gz
Use const references where possible for List range iterators
Diffstat (limited to 'scene/resources/navigation_mesh.cpp')
-rw-r--r--scene/resources/navigation_mesh.cpp4
1 files changed, 2 insertions, 2 deletions
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<Mesh> 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<Mesh> NavigationMesh::get_debug_mesh() {
{
Vector3 *w = varr.ptrw();
int idx = 0;
- for (Vector3 &E : lines) {
+ for (const Vector3 &E : lines) {
w[idx++] = E;
}
}