diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:22:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:15 +0400 |
commit | c67bd49e5607cc3db7446d4b12e1346fc9b2c83a (patch) | |
tree | bffbca1613b3ce8a5e356110c0d35b38dd6537cf /source/blender/editors/space_clip | |
parent | f2d25975b5e90f89744be733b81462493dc57977 (diff) |
Code cleanup: use 'const' for arrays (editors)
Diffstat (limited to 'source/blender/editors/space_clip')
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index c67e84671fb..ae75b9e3088 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -281,7 +281,7 @@ bool ED_space_clip_color_sample(Scene *scene, SpaceClip *sc, ARegion *ar, int mv fy = co[1]; if (fx >= 0.0f && fy >= 0.0f && fx < 1.0f && fy < 1.0f) { - float *fp; + const float *fp; unsigned char *cp; int x = (int)(fx * ibuf->x), y = (int)(fy * ibuf->y); diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index b8fe9fe4a17..6ef4b12eadf 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1056,7 +1056,7 @@ typedef struct ProxyQueue { int efra; SpinLock spin; - short *stop; + const short *stop; short *do_update; float *progress; } ProxyQueue; diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 43251ac930f..09ad8e7793b 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -4060,7 +4060,7 @@ static int slide_plane_marker_modal(bContext *C, wmOperator *op, const wmEvent * SlidePlaneMarkerData *data = (SlidePlaneMarkerData *) op->customdata; float dx, dy, mdelta[2]; int next_corner_index, prev_corner_index, diag_corner_index; - float *next_corner, *prev_corner, *diag_corner; + const float *next_corner, *prev_corner, *diag_corner; float next_edge[2], prev_edge[2], next_diag_edge[2], prev_diag_edge[2]; switch (event->type) { diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index ec3b10a008c..9909268bb53 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -174,8 +174,8 @@ static float dist_to_crns(float co[2], float pos[2], float crns[4][2]) { float d1, d2, d3, d4; float p[2] = {co[0] - pos[0], co[1] - pos[1]}; - float *v1 = crns[0], *v2 = crns[1]; - float *v3 = crns[2], *v4 = crns[3]; + const float *v1 = crns[0], *v2 = crns[1]; + const float *v3 = crns[2], *v4 = crns[3]; d1 = dist_squared_to_line_segment_v2(p, v1, v2); d2 = dist_squared_to_line_segment_v2(p, v2, v3); @@ -189,8 +189,8 @@ static float dist_to_crns(float co[2], float pos[2], float crns[4][2]) static float dist_to_crns_abs(float co[2], float corners[4][2]) { float d1, d2, d3, d4; - float *v1 = corners[0], *v2 = corners[1]; - float *v3 = corners[2], *v4 = corners[3]; + const float *v1 = corners[0], *v2 = corners[1]; + const float *v3 = corners[2], *v4 = corners[3]; d1 = dist_squared_to_line_segment_v2(co, v1, v2); d2 = dist_squared_to_line_segment_v2(co, v2, v3); |