diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-07 14:52:53 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-07 14:55:03 +0300 |
commit | 331f8500569df9b3b2aa776c5bcaad7b99c57295 (patch) | |
tree | 93547846177ff3415f9564ca54cb8f13433755cf /source/blender/editors/mask | |
parent | 11abeae99fdbfc8f047c4a3c1d2b9b8c47883516 (diff) |
Cleanup: redundant parenthesis
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_add.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_editaction.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index df30870007f..0ee1fc15d7f 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -845,7 +845,7 @@ static void define_primitive_add_properties(wmOperatorType *ot) static int primitive_circle_add_exec(bContext *C, wmOperator *op) { const float points[4][2] = {{0.0f, 0.5f}, {0.5f, 1.0f}, {1.0f, 0.5f}, {0.5f, 0.0f}}; - int num_points = sizeof(points) / (sizeof(float[2])); + int num_points = sizeof(points) / sizeof(float[2]); create_primitive_from_points(C, op, points, num_points, HD_AUTO); @@ -880,7 +880,7 @@ void MASK_OT_primitive_circle_add(wmOperatorType *ot) static int primitive_square_add_exec(bContext *C, wmOperator *op) { const float points[4][2] = {{0.0f, 0.0f}, {0.0f, 1.0f}, {1.0f, 1.0f}, {1.0f, 0.0f}}; - int num_points = sizeof(points) / (sizeof(float[2])); + int num_points = sizeof(points) / sizeof(float[2]); create_primitive_from_points(C, op, points, num_points, HD_VECT); diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 3b16497f09f..4bbb656c475 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -349,9 +349,9 @@ static void draw_spline_points(const bContext *C, static void mask_color_active_tint(uchar r_rgb[4], const uchar rgb[4], const bool is_active) { if (!is_active) { - r_rgb[0] = (uchar)((((int)(rgb[0])) + 128) / 2); - r_rgb[1] = (uchar)((((int)(rgb[1])) + 128) / 2); - r_rgb[2] = (uchar)((((int)(rgb[2])) + 128) / 2); + r_rgb[0] = (uchar)(((int)rgb[0] + 128) / 2); + r_rgb[1] = (uchar)(((int)rgb[1] + 128) / 2); + r_rgb[2] = (uchar)(((int)rgb[2] + 128) / 2); r_rgb[3] = rgb[3]; } else { diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c index 9819532224e..8ec6c356fd7 100644 --- a/source/blender/editors/mask/mask_editaction.c +++ b/source/blender/editors/mask/mask_editaction.c @@ -287,7 +287,7 @@ void ED_masklayer_frames_duplicate(MaskLayer *mask_layer) static bool snap_mask_layer_nearest(MaskLayerShape *mask_layer_shape, Scene *UNUSED(scene)) { if (mask_layer_shape->flag & MASK_SHAPE_SELECT) { - mask_layer_shape->frame = (int)(floor(mask_layer_shape->frame + 0.5)); + mask_layer_shape->frame = (int)floor(mask_layer_shape->frame + 0.5); } return false; } |