From 331f8500569df9b3b2aa776c5bcaad7b99c57295 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Oct 2022 22:52:53 +1100 Subject: Cleanup: redundant parenthesis --- source/blender/editors/gpencil/gpencil_weight_paint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_weight_paint.c') diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c index 8a949db5c5f..f73c6f8c658 100644 --- a/source/blender/editors/gpencil/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil/gpencil_weight_paint.c @@ -418,7 +418,7 @@ static void gpencil_weightpaint_select_stroke(tGP_BrushWeightpaintData *gso, pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; /* Do bound-box check first. */ - if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { + if (!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1]) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ int mval_i[2]; round_v2i_v2fl(mval_i, gso->mval); @@ -447,8 +447,8 @@ static void gpencil_weightpaint_select_stroke(tGP_BrushWeightpaintData *gso, gpencil_point_to_xy(gsc, gps, &npt, &pc2[0], &pc2[1]); /* Check that point segment of the bound-box of the selection stroke */ - if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || - ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { + if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1]) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || + (!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1]) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { /* Check if point segment of stroke had anything to do with * brush region (either within stroke painted, or on its lines) * - this assumes that line-width is irrelevant. @@ -579,7 +579,7 @@ static bool gpencil_weightpaint_brush_apply_to_layers(bContext *C, tGP_BrushWeig /* Find visible strokes, and perform operations on those if hit */ LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { /* If locked or no active frame, don't do anything. */ - if ((!BKE_gpencil_layer_is_editable(gpl)) || (gpl->actframe == NULL)) { + if (!BKE_gpencil_layer_is_editable(gpl) || (gpl->actframe == NULL)) { continue; } -- cgit v1.2.3