Fix range loop iteration regressions

This commit is contained in:
bitsawer 2023-01-25 23:17:53 +02:00
parent 10d22a4b35
commit 8c25bcdb84
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);