Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-09 04:00:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-09 04:00:21 +0400
commitaa2d84da37c909fa6b0ed03b54b0a3bc880f00a6 (patch)
tree0697e5957230bc6ff2ff48e9190e844e6853ea6c /source/blender/editors/gpencil/gpencil_paint.c
parent693ceacc86786003dbe165fda985dd1f4911bd07 (diff)
style cleanup:
also remove some redundant conversions int -> short -> int
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index e4bfbea75b0..dfd2783fad6 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -778,7 +778,8 @@ static short gp_stroke_eraser_splitdel(bGPDframe *gpf, bGPDstroke *gps, int i)
}
/* eraser tool - check if part of stroke occurs within last segment drawn by eraser */
-static short gp_stroke_eraser_strokeinside(int mval[], int UNUSED(mvalo[]), short rad, short x0, short y0, short x1, short y1)
+static short gp_stroke_eraser_strokeinside(const int mval[], const int UNUSED(mvalo[]),
+ int rad, int x0, int y0, int x1, int y1)
{
/* simple within-radius check for now */
if (edge_inside_circle(mval[0], mval[1], rad, x0, y0, x1, y1))
@@ -790,7 +791,9 @@ static short gp_stroke_eraser_strokeinside(int mval[], int UNUSED(mvalo[]), shor
/* eraser tool - evaluation per stroke */
// TODO: this could really do with some optimization (KD-Tree/BVH?)
-static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], short rad, rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
+static void gp_stroke_eraser_dostroke(tGPsdata *p,
+ const int mval[], const int mvalo[],
+ short rad, const rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
{
bGPDspoint *pt1, *pt2;
int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
@@ -827,7 +830,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], shor
/* do boundbox check first */
if (BLI_rcti_isect_pt(rect, x0, y0)) {
/* only check if point is inside */
- if ( ((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
+ if (((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
/* free stroke */
MEM_freeN(gps->points);
BLI_freelinkN(&gpf->strokes, gps);