diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-27 01:50:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-27 02:56:54 +0400 |
commit | b6e967be636d0e1bae842b2c52c76fd867a4784a (patch) | |
tree | fb1d7430f6bab8b1375019e8b585c850214e5992 /source/blender/editors/space_view3d/view3d_ruler.c | |
parent | 7ca74fc1c008355b84c08bcadb56ea6acabce2f3 (diff) |
Code cleanup: const args and arrays
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_ruler.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ruler.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c index c7f8abd7fb4..9d0a70ea9d0 100644 --- a/source/blender/editors/space_view3d/view3d_ruler.c +++ b/source/blender/editors/space_view3d/view3d_ruler.c @@ -282,9 +282,11 @@ static bool view3d_ruler_pick(RulerInfo *ruler_info, const float mval[2], ruler_item_best = ruler_item; { - float dist_points[3] = {len_squared_v2v2(co_ss[0], mval), - len_squared_v2v2(co_ss[1], mval), - len_squared_v2v2(co_ss[2], mval)}; + const float dist_points[3] = { + len_squared_v2v2(co_ss[0], mval), + len_squared_v2v2(co_ss[1], mval), + len_squared_v2v2(co_ss[2], mval), + }; if (min_fff(UNPACK3(dist_points)) < RULER_PICK_DIST_SQ) { co_index_best = min_axis_v3(dist_points); } @@ -301,8 +303,10 @@ static bool view3d_ruler_pick(RulerInfo *ruler_info, const float mval[2], ruler_item_best = ruler_item; { - float dist_points[2] = {len_squared_v2v2(co_ss[0], mval), - len_squared_v2v2(co_ss[2], mval)}; + const float dist_points[2] = { + len_squared_v2v2(co_ss[0], mval), + len_squared_v2v2(co_ss[2], mval), + }; if (min_ff(UNPACK2(dist_points)) < RULER_PICK_DIST_SQ) { co_index_best = (dist_points[0] < dist_points[1]) ? 0 : 2; } |