diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-01 21:45:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-01 21:45:02 +0300 |
commit | f688e3cc3130e70e77f0bb050cd71cf1549c765c (patch) | |
tree | cb70e8529ac06af6303d8fef5bdf0d294d573a1d /source/blender/draw/engines/overlay/overlay_extra.c | |
parent | 999f6526b1bc049cdccad3c7a8e165ab342f82d9 (diff) |
Cleanup: Use const for bounding boxes where possible
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_extra.c')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_extra.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index 9953480e7fa..4f0bf0b8048 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -345,18 +345,17 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb, bool around_origin) { float center[3], size[3], tmp[4][4], final_mat[4][4]; - BoundBox bb_local; if (ob->type == OB_MBALL && !BKE_mball_is_basis(ob)) { return; } - BoundBox *bb = BKE_object_boundbox_get(ob); - + const BoundBox *bb = BKE_object_boundbox_get(ob); + BoundBox bb_local; if (bb == NULL) { const float min[3] = {-1.0f, -1.0f, -1.0f}, max[3] = {1.0f, 1.0f, 1.0f}; + BKE_boundbox_init_from_minmax(&bb_local, min, max); bb = &bb_local; - BKE_boundbox_init_from_minmax(bb, min, max); } BKE_boundbox_calc_size_aabb(bb, size); |