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 <campbell@blender.org>2022-09-25 08:14:13 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 08:34:32 +0300
commitc9e35c2ced92082c86f1ecb9ecd16c6230218c7c (patch)
tree24bd862961d2bbfa022cfc3c5262cfe1e63550b3 /source/blender/editors/sculpt_paint
parent865894481ce76325d817533c654bda2ce2e65c66 (diff)
Cleanup: remove redundant double parenthesis
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc3
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
5 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 5df65e596b9..79316361e53 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -150,7 +150,7 @@ static void brush_painter_2d_require_imbuf(
{
BrushPainterCache *cache = &tile->cache;
- if ((cache->use_float != use_float)) {
+ if (cache->use_float != use_float) {
if (cache->ibuf) {
IMB_freeImBuf(cache->ibuf);
}
@@ -1178,8 +1178,8 @@ static ImBuf *paint_2d_lift_clone(ImBuf *ibuf, ImBuf *ibufb, const int *pos)
static void paint_2d_convert_brushco(ImBuf *ibufb, const float pos[2], int ipos[2])
{
- ipos[0] = (int)floorf((pos[0] - ibufb->x / 2));
- ipos[1] = (int)floorf((pos[1] - ibufb->y / 2));
+ ipos[0] = (int)floorf(pos[0] - ibufb->x / 2);
+ ipos[1] = (int)floorf(pos[1] - ibufb->y / 2);
}
static void paint_2d_do_making_brush(ImagePaintState *s,
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 9abc3c5112e..c6eefb0b50e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -2459,7 +2459,7 @@ static void wpaint_do_symmetrical_brush_actions(
/* symm is a bit combination of XYZ - 1 is mirror
* X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
for (i = 1; i <= symm; i++) {
- if ((symm & i && (symm != 5 || i != 3) && (symm != 6 || (!ELEM(i, 3, 5))))) {
+ if (symm & i && (symm != 5 || i != 3) && (symm != 6 || (!ELEM(i, 3, 5)))) {
cache->mirror_symmetry_pass = i;
cache->radial_symmetry_pass = 0;
SCULPT_cache_calc_brushdata_symm(cache, i, 0, 0);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
index a284d1608cb..707de6755b3 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
@@ -73,8 +73,7 @@ static bool vertex_paint_from_weight(Object *ob)
using namespace blender;
Mesh *me;
- if (((me = BKE_mesh_from_object(ob)) == nullptr ||
- (ED_mesh_color_ensure(me, nullptr)) == false)) {
+ if ((me = BKE_mesh_from_object(ob)) == nullptr || (ED_mesh_color_ensure(me, nullptr)) == false) {
return false;
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c
index ac16631f115..22346434ed5 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_utils.c
@@ -203,7 +203,7 @@ BLI_INLINE float wval_screen(float weight, float paintval, float fac)
return weight;
}
mfac = 1.0f - fac;
- temp = max_ff(1.0f - (((1.0f - weight) * (1.0f - paintval))), 0);
+ temp = max_ff(1.0f - ((1.0f - weight) * (1.0f - paintval)), 0);
return mfac * weight + temp * fac;
}
BLI_INLINE float wval_hardlight(float weight, float paintval, float fac)
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 688573d78a6..eb4cc9fd866 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3029,7 +3029,7 @@ void SCULPT_calc_brush_plane(
int SCULPT_plane_trim(const StrokeCache *cache, const Brush *brush, const float val[3])
{
return (!(brush->flag & BRUSH_PLANE_TRIM) ||
- ((dot_v3v3(val, val) <= cache->radius_squared * cache->plane_trim_squared)));
+ (dot_v3v3(val, val) <= cache->radius_squared * cache->plane_trim_squared));
}
int SCULPT_plane_point_side(const float co[3], const float plane[4])