diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-30 09:37:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-30 09:42:19 +0300 |
commit | 501d2443d03cce18985fab3ffad5d23238748f3e (patch) | |
tree | 1d127d4e4c6d82fc85feedc9826dd5619174e346 /source/blender/editors/gpencil/gpencil_utils.c | |
parent | df9597cfba78deb40009553ab9dcf09c21edd434 (diff) |
Cleanup: use const arguments for accessor functions
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 15ada6e0891..54672743439 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -3106,8 +3106,8 @@ void ED_gpencil_sbuffer_vertex_color_set(Depsgraph *depsgraph, } /* Get the bigger 2D bound box points. */ -void ED_gpencil_projected_2d_bound_box(GP_SpaceConversion *gsc, - bGPDstroke *gps, +void ED_gpencil_projected_2d_bound_box(const GP_SpaceConversion *gsc, + const bGPDstroke *gps, const float diff_mat[4][4], float r_min[2], float r_max[2]) @@ -3140,7 +3140,7 @@ void ED_gpencil_projected_2d_bound_box(GP_SpaceConversion *gsc, } /* Check if the stroke collides with brush. */ -bool ED_gpencil_stroke_check_collision(GP_SpaceConversion *gsc, +bool ED_gpencil_stroke_check_collision(const GP_SpaceConversion *gsc, bGPDstroke *gps, const float mouse[2], const int radius, @@ -3175,9 +3175,9 @@ bool ED_gpencil_stroke_check_collision(GP_SpaceConversion *gsc, * \param diff_mat: View matrix. * \return True if the point is inside. */ -bool ED_gpencil_stroke_point_is_inside(bGPDstroke *gps, - GP_SpaceConversion *gsc, - int mouse[2], +bool ED_gpencil_stroke_point_is_inside(const bGPDstroke *gps, + const GP_SpaceConversion *gsc, + const int mouse[2], const float diff_mat[4][4]) { bool hit = false; @@ -3190,7 +3190,7 @@ bool ED_gpencil_stroke_point_is_inside(bGPDstroke *gps, mcoords = MEM_mallocN(sizeof(int[2]) * len, __func__); /* Convert stroke to 2D array of points. */ - bGPDspoint *pt; + const bGPDspoint *pt; int i; for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { bGPDspoint pt2; @@ -3214,7 +3214,7 @@ bool ED_gpencil_stroke_point_is_inside(bGPDstroke *gps, } bGPDstroke *ED_gpencil_stroke_nearest_to_ends(bContext *C, - GP_SpaceConversion *gsc, + const GP_SpaceConversion *gsc, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, |