diff options
author | Hans Goudey <h.goudey@me.com> | 2021-07-02 07:03:09 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-07-02 07:03:27 +0300 |
commit | 9f5c0ffb5ec293af2e4f003c2178d21e20805b47 (patch) | |
tree | eb5b5c98fae3402da6ad98472ad5f5ea1cfbacd0 /source/blender/draw/intern/draw_cache_impl.h | |
parent | 016a2707f573efe113f89ced1870912de19a16a1 (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/draw/intern/draw_cache_impl.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index 5743f39f7da..220a7f37c3d 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -219,7 +219,7 @@ struct GPUVertBuf *DRW_mesh_batch_cache_pos_vertbuf_get(struct Mesh *me); struct GPUVertBuf *DRW_curve_batch_cache_pos_vertbuf_get(struct Curve *cu); struct GPUVertBuf *DRW_mball_batch_cache_pos_vertbuf_get(struct Object *ob); -int DRW_mesh_material_count_get(struct Mesh *me); +int DRW_mesh_material_count_get(const struct Mesh *me); /* See 'common_globals_lib.glsl' for duplicate defines. */ |