diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-07 15:36:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-07 15:37:39 +0300 |
commit | b134434224254d4ac3fc73d023f2f6d914746690 (patch) | |
tree | b67d2c5aee982495d55848414c362665a37476b0 /source/blender/editors/space_clip/tracking_select.c | |
parent | 3db67fd670535c0a709ec6e8204fcb730cd3eb0d (diff) |
Cleanup: declare arrays arrays where possible
Diffstat (limited to 'source/blender/editors/space_clip/tracking_select.c')
-rw-r--r-- | source/blender/editors/space_clip/tracking_select.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index b6f9ca9589f..615d09a04b2 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -153,9 +153,9 @@ static float dist_to_rect(const float co[2], const float max[2]) { float d1, d2, d3, d4; - float p[2] = {co[0] - pos[0], co[1] - pos[1]}; - float v1[2] = {min[0], min[1]}, v2[2] = {max[0], min[1]}; - float v3[2] = {max[0], max[1]}, v4[2] = {min[0], max[1]}; + const float p[2] = {co[0] - pos[0], co[1] - pos[1]}; + const float v1[2] = {min[0], min[1]}, v2[2] = {max[0], min[1]}; + const float v3[2] = {max[0], max[1]}, v4[2] = {min[0], max[1]}; d1 = dist_squared_to_line_segment_v2(p, v1, v2); d2 = dist_squared_to_line_segment_v2(p, v2, v3); @@ -169,7 +169,7 @@ static float dist_to_rect(const float co[2], static float dist_to_crns(const float co[2], const float pos[2], const float crns[4][2]) { float d1, d2, d3, d4; - float p[2] = {co[0] - pos[0], co[1] - pos[1]}; + const float p[2] = {co[0] - pos[0], co[1] - pos[1]}; const float *v1 = crns[0], *v2 = crns[1]; const float *v3 = crns[2], *v4 = crns[3]; |