diff options
Diffstat (limited to 'modules/navigation/navigation_mesh_generator.cpp')
-rw-r--r-- | modules/navigation/navigation_mesh_generator.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index fff7a02fc4..74ff9312fd 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -266,9 +266,7 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans if (err == OK) { PackedVector3Array faces; - for (uint32_t j = 0; j < md.faces.size(); ++j) { - const Geometry3D::MeshData::Face &face = md.faces[j]; - + for (const Geometry3D::MeshData::Face &face : md.faces) { for (uint32_t k = 2; k < face.indices.size(); ++k) { faces.push_back(md.vertices[face.indices[0]]); faces.push_back(md.vertices[face.indices[k - 1]]); @@ -392,9 +390,7 @@ void NavigationMeshGenerator::_parse_geometry(const Transform3D &p_navmesh_trans if (err == OK) { PackedVector3Array faces; - for (uint32_t j = 0; j < md.faces.size(); ++j) { - const Geometry3D::MeshData::Face &face = md.faces[j]; - + for (const Geometry3D::MeshData::Face &face : md.faces) { for (uint32_t k = 2; k < face.indices.size(); ++k) { faces.push_back(md.vertices[face.indices[0]]); faces.push_back(md.vertices[face.indices[k - 1]]); |