diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-14 01:10:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-14 01:12:53 +0300 |
commit | 0547a7753643f45861306542857d97215ecb2c4f (patch) | |
tree | 1faad834721f7f13d4a0756bd80607963386fccd /source/blender/editors/gpencil | |
parent | d30ec73d763ed01795100ec5d3a0ef9dc8521f7b (diff) |
Cleanup: use const args, variables
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 7 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 11 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 8 |
6 files changed, 19 insertions, 13 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index 683ee7fb973..67bf64a2903 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -95,7 +95,7 @@ static void annotation_draw_stroke_buffer(const tGPspoint *points, short thickness, short dflag, short sflag, - float ink[4]) + const float ink[4]) { int draw_points = 0; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 4015fa12438..80795b825b0 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -267,8 +267,11 @@ static void gp_calc_2d_bounding_box( } /* calc texture coordinates using flat projected points */ -static void gp_calc_stroke_text_coordinates( - const float (*points2d)[2], int totpoints, float minv[2], float maxv[2], float (*r_uv)[2]) +static void gp_calc_stroke_text_coordinates(const float (*points2d)[2], + int totpoints, + const float minv[2], + float maxv[2], + float (*r_uv)[2]) { float d[2]; d[0] = maxv[0] - minv[0]; diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 89cb85b0e17..2a2e7c21df4 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -565,7 +565,7 @@ static void gp_brush_grab_calc_dvec(tGP_BrushEditData *gso) /* Apply grab transform to all relevant points of the affected strokes */ static void gp_brush_grab_apply_cached(tGP_BrushEditData *gso, bGPDstroke *gps, - float diff_mat[4][4]) + const float diff_mat[4][4]) { tGPSB_Grab_StrokeData *data = BLI_ghash_lookup(gso->stroke_customdata, gps); int i; @@ -1555,7 +1555,7 @@ static float gpsculpt_rotation_eval_get(GP_SpaceConversion *gsc, /* Apply brush operation to points in this stroke */ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso, bGPDstroke *gps, - float diff_mat[4][4], + const float diff_mat[4][4], GP_BrushApplyCb apply) { GP_SpaceConversion *gsc = &gso->gsc; @@ -1680,8 +1680,11 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso, } /* Apply sculpt brushes to strokes in the given frame */ -static bool gpsculpt_brush_do_frame( - bContext *C, tGP_BrushEditData *gso, bGPDlayer *gpl, bGPDframe *gpf, float diff_mat[4][4]) +static bool gpsculpt_brush_do_frame(bContext *C, + tGP_BrushEditData *gso, + bGPDlayer *gpl, + bGPDframe *gpf, + const float diff_mat[4][4]) { bool changed = false; Object *ob = CTX_data_active_object(C); diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 1834261e1bf..96302bcbe63 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -3021,7 +3021,7 @@ static void gpencil_flip_stroke(bGPDstroke *gps) static void gpencil_stroke_copy_point(bGPDstroke *gps, bGPDspoint *point, int idx, - float delta[3], + const float delta[3], float pressure, float strength, float deltatime) diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index f4484624d5a..b7b73c1b501 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -840,7 +840,7 @@ static bool gp_stroke_do_circle_sel(bGPDlayer *gpl, const int radius, const bool select, rcti *rect, - float diff_mat[4][4], + const float diff_mat[4][4], const int selectmode, const float scale) { diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 3ee7aed0a02..89a2a987f60 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1952,7 +1952,7 @@ void ED_gpencil_setup_modes(bContext *C, bGPdata *gpd, int newmode) /* helper to convert 2d to 3d for simple drawing buffer */ static void gpencil_stroke_convertcoords(ARegion *ar, const tGPspoint *point2D, - float origin[3], + const float origin[3], float out[3]) { float mval_f[2] = {(float)point2D->x, (float)point2D->y}; @@ -2084,8 +2084,8 @@ static bool gpencil_check_collision(bGPDstroke *gps, bGPDstroke **gps_array, GHash *all_2d, int totstrokes, - float p2d_a1[2], - float p2d_a2[2], + const float p2d_a1[2], + const float p2d_a2[2], float r_hit[2]) { bool hit = false; @@ -2164,7 +2164,7 @@ static void gp_copy_points(bGPDstroke *gps, bGPDspoint *pt, bGPDspoint *pt_final } static void gp_insert_point( - bGPDstroke *gps, bGPDspoint *a_pt, bGPDspoint *b_pt, float co_a[3], float co_b[3]) + bGPDstroke *gps, bGPDspoint *a_pt, bGPDspoint *b_pt, const float co_a[3], float co_b[3]) { bGPDspoint *temp_points; int totnewpoints, oldtotpoints; |