diff options
author | Clay John <claynjohn@gmail.com> | 2022-08-18 14:04:46 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 14:04:46 -0600 |
commit | 54eaf662b4e6a9d5715e08279a8816ba4ce36741 (patch) | |
tree | d22c5f607acb374776256df683614eee4a3d9782 | |
parent | e392746da52040b9324e9ab3b6e5cd4c531ac19e (diff) | |
parent | f91934872dcb788e1c7079e60da5edf275528276 (diff) |
Merge pull request #64581 from aaronfranke/aabb
Use a const ref for the bone AABB in rendering code
-rw-r--r-- | drivers/gles3/storage/mesh_storage.cpp | 4 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index d2c2aa0259..dee715150b 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -255,9 +255,9 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->bone_aabbs.resize(p_surface.bone_aabbs.size()); } for (int i = 0; i < p_surface.bone_aabbs.size(); i++) { - AABB bone = p_surface.bone_aabbs[i]; + const AABB &bone = p_surface.bone_aabbs[i]; if (!bone.has_no_volume()) { - mesh->bone_aabbs.write[i].merge_with(p_surface.bone_aabbs[i]); + mesh->bone_aabbs.write[i].merge_with(bone); } } mesh->aabb.merge_with(p_surface.aabb); diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index 08cfeb2019..585c42b2d8 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -416,9 +416,9 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->bone_aabbs.resize(p_surface.bone_aabbs.size()); } for (int i = 0; i < p_surface.bone_aabbs.size(); i++) { - AABB bone = p_surface.bone_aabbs[i]; + const AABB &bone = p_surface.bone_aabbs[i]; if (!bone.has_no_volume()) { - mesh->bone_aabbs.write[i].merge_with(p_surface.bone_aabbs[i]); + mesh->bone_aabbs.write[i].merge_with(bone); } } mesh->aabb.merge_with(p_surface.aabb); |