diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-08-18 12:20:11 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-08-18 12:20:11 -0500 |
commit | f91934872dcb788e1c7079e60da5edf275528276 (patch) | |
tree | b4d6027c30ba55f5d032df85225d181cf7cbe3ff | |
parent | 462bb3bf329229dd4c11daa38c7847f5985fb1a1 (diff) |
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); |