Merge pull request #72078 from bitsawer/fix_optimize_vertices

Fix range loop iteration regressions
This commit is contained in:
Rémi Verschelde 2023-01-26 01:11:25 +01:00
commit 31496c296a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ void Geometry3D::MeshData::optimize_vertices() {
}
}
for (MeshData::Edge edge : edges) {
for (MeshData::Edge &edge : edges) {
int a = edge.vertex_a;
int b = edge.vertex_b;

View File

@ -842,7 +842,7 @@ void MeshStorage::mesh_instance_set_blend_shape_weight(RID p_mesh_instance, int
}
void MeshStorage::_mesh_instance_clear(MeshInstance *mi) {
for (const RendererRD::MeshStorage::MeshInstance::Surface surface : mi->surfaces) {
for (const RendererRD::MeshStorage::MeshInstance::Surface &surface : mi->surfaces) {
if (surface.versions) {
for (uint32_t j = 0; j < surface.version_count; j++) {
RD::get_singleton()->free(surface.versions[j].vertex_array);