From f688e3cc3130e70e77f0bb050cd71cf1549c765c Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 1 Apr 2022 13:45:02 -0500 Subject: Cleanup: Use const for bounding boxes where possible --- source/blender/editors/sculpt_paint/sculpt.c | 2 +- source/blender/editors/space_view3d/space_view3d.c | 2 +- source/blender/editors/transform/transform_snap_object.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index be105a23a84..3644c3177d3 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3699,7 +3699,7 @@ static void do_tiled( SculptSession *ss = ob->sculpt; StrokeCache *cache = ss->cache; const float radius = cache->radius; - BoundBox *bb = BKE_object_boundbox_get(ob); + const BoundBox *bb = BKE_object_boundbox_get(ob); const float *bbMin = bb->vec[0]; const float *bbMax = bb->vec[6]; const float *step = sd->paint.tile_offset; diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 2b613d0206e..3f2fbb97de1 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -702,7 +702,7 @@ static void view3d_ob_drop_matrix_from_snap(V3DSnapCursorState *snap_state, mat4_to_size(scale, ob->obmat); rescale_m4(obmat_final, scale); - BoundBox *bb = BKE_object_boundbox_get(ob); + const BoundBox *bb = BKE_object_boundbox_get(ob); if (bb) { float offset[3]; BKE_boundbox_calc_center_aabb(bb, offset); diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 3ef5056de85..21f3a42e278 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -718,7 +718,7 @@ static bool raycastMesh(SnapObjectContext *sctx, } /* Test BoundBox */ - BoundBox *bb = BKE_object_boundbox_get(ob_eval); + const BoundBox *bb = BKE_object_boundbox_get(ob_eval); if (bb) { /* was BKE_boundbox_ray_hit_check, see: cf6ca226fa58 */ if (!isect_ray_aabb_v3_simple( @@ -1866,7 +1866,7 @@ static short snapArmature(SnapObjectContext *sctx, if (is_editmode == false) { /* Test BoundBox */ - BoundBox *bb = BKE_armature_boundbox_get(ob_eval); + const BoundBox *bb = BKE_armature_boundbox_get(ob_eval); if (bb && !snap_bound_box_check_dist(bb->vec[0], bb->vec[6], lpmat, -- cgit v1.2.3