summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorrune-scape <spartacrafter@gmail.com>2024-07-28 08:28:24 -0700
committerrune-scape <spartacrafter@gmail.com>2024-08-28 14:46:03 -0700
commitf04a9bb63027fb5284070b3d8f51d094f37b59f8 (patch)
treec96798fe8110f663ff16542ed2f29eb437968561 /drivers
parent40b378e9e2338d84f897f6991cc913a713295785 (diff)
downloadredot-engine-f04a9bb63027fb5284070b3d8f51d094f37b59f8.tar.gz
Avoid const_cast in mesh_storage.h
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/storage/mesh_storage.cpp4
-rw-r--r--drivers/gles3/storage/mesh_storage.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp
index b55a2e0a8a..6aa67ef01e 100644
--- a/drivers/gles3/storage/mesh_storage.cpp
+++ b/drivers/gles3/storage/mesh_storage.cpp
@@ -1768,14 +1768,14 @@ AABB MeshStorage::_multimesh_get_custom_aabb(RID p_multimesh) const {
return multimesh->custom_aabb;
}
-AABB MeshStorage::_multimesh_get_aabb(RID p_multimesh) const {
+AABB MeshStorage::_multimesh_get_aabb(RID p_multimesh) {
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
ERR_FAIL_NULL_V(multimesh, AABB());
if (multimesh->custom_aabb != AABB()) {
return multimesh->custom_aabb;
}
if (multimesh->aabb_dirty) {
- const_cast<MeshStorage *>(this)->_update_dirty_multimeshes();
+ _update_dirty_multimeshes();
}
return multimesh->aabb;
}
diff --git a/drivers/gles3/storage/mesh_storage.h b/drivers/gles3/storage/mesh_storage.h
index a2edbb9c48..31858cd372 100644
--- a/drivers/gles3/storage/mesh_storage.h
+++ b/drivers/gles3/storage/mesh_storage.h
@@ -510,7 +510,7 @@ public:
virtual RID _multimesh_get_mesh(RID p_multimesh) const override;
virtual void _multimesh_set_custom_aabb(RID p_multimesh, const AABB &p_aabb) override;
virtual AABB _multimesh_get_custom_aabb(RID p_multimesh) const override;
- virtual AABB _multimesh_get_aabb(RID p_multimesh) const override;
+ virtual AABB _multimesh_get_aabb(RID p_multimesh) override;
virtual Transform3D _multimesh_instance_get_transform(RID p_multimesh, int p_index) const override;
virtual Transform2D _multimesh_instance_get_transform_2d(RID p_multimesh, int p_index) const override;