Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-07-02 07:03:09 +0300
committerHans Goudey <h.goudey@me.com>2021-07-02 07:03:27 +0300
commit9f5c0ffb5ec293af2e4f003c2178d21e20805b47 (patch)
treeeb5b5c98fae3402da6ad98472ad5f5ea1cfbacd0 /source/blender/blenkernel/intern/displist.cc
parent016a2707f573efe113f89ced1870912de19a16a1 (diff)
Cleanup: Use const variables for object's evaluated mesh
Generally the evaluated mesh should not be changed, since that is the job of the modifier stack. Current code is far from const correct in that regard. This commit uses a const variable for the reult of `BKE_object_get_evaluated_mesh` in some cases. The most common remaining case is retrieving a BVH tree from the mesh.
Diffstat (limited to 'source/blender/blenkernel/intern/displist.cc')
-rw-r--r--source/blender/blenkernel/intern/displist.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc
index cfe4701fb69..a4ffaa8b10b 100644
--- a/source/blender/blenkernel/intern/displist.cc
+++ b/source/blender/blenkernel/intern/displist.cc
@@ -1694,7 +1694,7 @@ static void boundbox_displist_object(Object *ob)
ob->runtime.bb = (BoundBox *)MEM_callocN(sizeof(BoundBox), __func__);
}
- Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob);
+ const Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob);
if (mesh_eval) {
BKE_object_boundbox_calc_from_mesh(ob, mesh_eval);
}