From 48e089375ebe4aeb30d60e9d8ef6f467280cf07d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Aug 2020 22:56:13 +1000 Subject: Cleanup: pass arrays const where possible --- source/blender/editors/space_clip/clip_buttons.c | 2 +- source/blender/editors/space_clip/clip_dopesheet_draw.c | 4 +++- source/blender/editors/space_clip/clip_graph_ops.c | 4 ++-- source/blender/editors/space_clip/tracking_select.c | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_clip') diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 71f75d96cb1..80ce07d39ef 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -273,7 +273,7 @@ typedef struct { int marker_flag; } MarkerUpdateCb; -static void to_pixel_space(float r[2], float a[2], int width, int height) +static void to_pixel_space(float r[2], const float a[2], int width, int height) { copy_v2_v2(r, a); r[0] *= width; diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c index c3aca95910b..c7328ae9f8f 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_draw.c +++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c @@ -49,7 +49,9 @@ #include "clip_intern.h" /* own include */ -static void track_channel_color(MovieTrackingTrack *track, float default_color[3], float color[3]) +static void track_channel_color(MovieTrackingTrack *track, + const float default_color[3], + float color[3]) { if (track->flag & TRACK_CUSTOMCOLOR) { float bg[3]; diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 63d9889e662..ffd3241a30f 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -178,7 +178,7 @@ static void mouse_select_init_data(bContext *C, MouseSelectUserData *userdata, c copy_v2_v2(userdata->mouse_co, co); } -static bool mouse_select_knot(bContext *C, float co[2], bool extend) +static bool mouse_select_knot(bContext *C, const float co[2], bool extend) { SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip_get_clip(sc); @@ -236,7 +236,7 @@ static bool mouse_select_knot(bContext *C, float co[2], bool extend) return false; } -static bool mouse_select_curve(bContext *C, float co[2], bool extend) +static bool mouse_select_curve(bContext *C, const float co[2], bool extend) { SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip_get_clip(sc); diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index 615d09a04b2..80d0dd773b2 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -744,7 +744,9 @@ static int point_inside_ellipse(const float point[2], return x * x + y * y < 1.0f; } -static int marker_inside_ellipse(MovieTrackingMarker *marker, float offset[2], float ellipse[2]) +static int marker_inside_ellipse(MovieTrackingMarker *marker, + const float offset[2], + const float ellipse[2]) { return point_inside_ellipse(marker->pos, offset, ellipse); } -- cgit v1.2.3