summaryrefslogtreecommitdiff
path: root/drivers/gles3/storage
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-08-18 12:20:11 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-08-18 12:20:11 -0500
commitf91934872dcb788e1c7079e60da5edf275528276 (patch)
treeb4d6027c30ba55f5d032df85225d181cf7cbe3ff /drivers/gles3/storage
parent462bb3bf329229dd4c11daa38c7847f5985fb1a1 (diff)
Use a const ref for the bone AABB in rendering code
Diffstat (limited to 'drivers/gles3/storage')
-rw-r--r--drivers/gles3/storage/mesh_storage.cpp4
1 files changed, 2 insertions, 2 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);