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/blenkernel
parent865894481ce76325d817533c654bda2ce2e65c66 (diff)
Cleanup: remove redundant double parenthesis
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/collection.c4
-rw-r--r--source/blender/blenkernel/intern/curveprofile.cc2
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c4
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c4
-rw-r--r--source/blender/blenkernel/intern/layer.c2
-rw-r--r--source/blender/blenkernel/intern/lib_override.cc8
-rw-r--r--source/blender/blenkernel/intern/lib_remap.c2
-rw-r--r--source/blender/blenkernel/intern/mask.c2
-rw-r--r--source/blender/blenkernel/intern/pbvh.c16
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c2
-rw-r--r--source/blender/blenkernel/intern/scene.cc2
-rw-r--r--source/blender/blenkernel/intern/softbody.c4
-rw-r--r--source/blender/blenkernel/intern/undo_system.c4
-rw-r--r--source/blender/blenkernel/intern/vfont.c2
-rw-r--r--source/blender/blenkernel/intern/volume.cc2
16 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 98b1e3d0039..82b358b77a1 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -796,10 +796,10 @@ static void collection_object_cache_fill(ListBase *lb,
/* Only collection flags are checked here currently, object restrict flag is checked
* in FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN since it can be animated
* without updating the cache. */
- if (((child_restrict & COLLECTION_HIDE_VIEWPORT) == 0)) {
+ if ((child_restrict & COLLECTION_HIDE_VIEWPORT) == 0) {
base->flag |= BASE_ENABLED_VIEWPORT;
}
- if (((child_restrict & COLLECTION_HIDE_RENDER) == 0)) {
+ if ((child_restrict & COLLECTION_HIDE_RENDER) == 0) {
base->flag |= BASE_ENABLED_RENDER;
}
}
diff --git a/source/blender/blenkernel/intern/curveprofile.cc b/source/blender/blenkernel/intern/curveprofile.cc
index 2f3fc2e95d8..0e34e4a55dd 100644
--- a/source/blender/blenkernel/intern/curveprofile.cc
+++ b/source/blender/blenkernel/intern/curveprofile.cc
@@ -379,7 +379,7 @@ static void curveprofile_build_supports(CurveProfile *profile)
point_init(&profile->path[0], 1.0f, 0.0f, 0, HD_VECT, HD_VECT);
point_init(&profile->path[1], 1.0f, 0.5f, 0, HD_VECT, HD_VECT);
for (int i = 1; i < n - 2; i++) {
- const float x = 1.0f - (0.5f * (1.0f - cosf((float)((i / (float)(n - 3))) * M_PI_2)));
+ const float x = 1.0f - (0.5f * (1.0f - cosf((float)(i / (float)(n - 3)) * M_PI_2)));
const float y = 0.5f + 0.5f * sinf((float)((i / (float)(n - 3)) * M_PI_2));
point_init(&profile->path[i], x, y, 0, HD_AUTO, HD_AUTO);
}
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 36f038e68ab..e6afca11b40 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -374,8 +374,8 @@ float data_transfer_interp_float_do(const int mix_mode,
{
float val_ret;
- if (((mix_mode == CDT_MIX_REPLACE_ABOVE_THRESHOLD && (val_dst < mix_factor)) ||
- (mix_mode == CDT_MIX_REPLACE_BELOW_THRESHOLD && (val_dst > mix_factor)))) {
+ if ((mix_mode == CDT_MIX_REPLACE_ABOVE_THRESHOLD && (val_dst < mix_factor)) ||
+ (mix_mode == CDT_MIX_REPLACE_BELOW_THRESHOLD && (val_dst > mix_factor))) {
return val_dst; /* Do not affect destination. */
}
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 9d46c381d7a..ddffb91cef7 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1762,7 +1762,7 @@ bool dynamicPaint_resetSurface(const Scene *scene, DynamicPaintSurface *surface)
static bool dynamicPaint_checkSurfaceData(const Scene *scene, DynamicPaintSurface *surface)
{
if (!surface->data ||
- ((dynamicPaint_surfaceNumOfPoints(surface) != surface->data->total_points))) {
+ (dynamicPaint_surfaceNumOfPoints(surface) != surface->data->total_points)) {
return dynamicPaint_resetSurface(scene, surface);
}
return true;
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 98c317c547b..f876caf9d91 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -829,8 +829,8 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is
case IDP_DOUBLE:
return (IDP_Double(prop1) == IDP_Double(prop2));
case IDP_STRING: {
- return (((prop1->len == prop2->len) &&
- STREQLEN(IDP_String(prop1), IDP_String(prop2), (size_t)prop1->len)));
+ return ((prop1->len == prop2->len) &&
+ STREQLEN(IDP_String(prop1), IDP_String(prop2), (size_t)prop1->len));
}
case IDP_ARRAY:
if (prop1->len == prop2->len && prop1->subtype == prop2->subtype) {
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index d779fc4f512..220b28a32f1 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1022,7 +1022,7 @@ static void layer_collection_objects_sync(ViewLayer *view_layer,
if ((layer_restrict & LAYER_COLLECTION_HIDE) == 0) {
base->flag_from_collection |= BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT;
}
- if (((collection_restrict & COLLECTION_HIDE_SELECT) == 0)) {
+ if ((collection_restrict & COLLECTION_HIDE_SELECT) == 0) {
base->flag_from_collection |= BASE_SELECTABLE;
}
}
diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc
index 3f1b80014ac..7202570f732 100644
--- a/source/blender/blenkernel/intern/lib_override.cc
+++ b/source/blender/blenkernel/intern/lib_override.cc
@@ -494,8 +494,8 @@ bool BKE_lib_override_library_create_from_tag(Main *bmain,
if (id_hierarchy_root != nullptr) {
/* If the hierarchy root is given, it must be a valid existing override (used during partial
* resync process mainly). */
- BLI_assert((ID_IS_OVERRIDE_LIBRARY_REAL(id_hierarchy_root) &&
- id_hierarchy_root->override_library->reference->lib == id_root_reference->lib));
+ BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id_hierarchy_root) &&
+ id_hierarchy_root->override_library->reference->lib == id_root_reference->lib);
if (!do_no_main) {
/* When processing within Main, set existing overrides in given hierarchy as 'newid' of their
@@ -507,8 +507,8 @@ bool BKE_lib_override_library_create_from_tag(Main *bmain,
if (!ELEM(id_hierarchy_root_reference, nullptr, id_root_reference)) {
/* If the reference hierarchy root is given, it must be from the same library as the reference
* root, and also tagged for override. */
- BLI_assert((id_hierarchy_root_reference->lib == id_root_reference->lib &&
- (id_hierarchy_root_reference->tag & LIB_TAG_DOIT) != 0));
+ BLI_assert(id_hierarchy_root_reference->lib == id_root_reference->lib &&
+ (id_hierarchy_root_reference->tag & LIB_TAG_DOIT) != 0);
}
const Library *reference_library = id_root_reference->lib;
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c
index 2ebdc6788d9..addb7b0988c 100644
--- a/source/blender/blenkernel/intern/lib_remap.c
+++ b/source/blender/blenkernel/intern/lib_remap.c
@@ -183,7 +183,7 @@ static int foreach_libblock_remap_callback(LibraryIDLinkCallbackData *cb_data)
/* Better remap to NULL than not remapping at all,
* then we can handle it as a regular remap-to-NULL case. */
- if ((cb_flag & IDWALK_CB_NEVER_SELF)) {
+ if (cb_flag & IDWALK_CB_NEVER_SELF) {
id_remapper_options |= ID_REMAP_APPLY_UNMAP_WHEN_REMAPPING_TO_SELF;
}
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index 0b8351efdf4..d877620855f 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -308,7 +308,7 @@ BezTriple *BKE_mask_spline_point_next_bezt(MaskSpline *spline,
return NULL;
}
- return &((point + 1))->bezt;
+ return &(point + 1)->bezt;
}
MaskSplinePoint *BKE_mask_spline_point_array(MaskSpline *spline)
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index aad19a8b842..fb61c3750a1 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -2168,8 +2168,8 @@ bool ray_face_intersection_tri(const float ray_start[3],
float *depth)
{
float depth_test;
- if ((isect_ray_tri_watertight_v3(ray_start, isect_precalc, t0, t1, t2, &depth_test, NULL) &&
- (depth_test < *depth))) {
+ if (isect_ray_tri_watertight_v3(ray_start, isect_precalc, t0, t1, t2, &depth_test, NULL) &&
+ (depth_test < *depth)) {
*depth = depth_test;
return true;
}
@@ -2214,12 +2214,12 @@ bool ray_face_nearest_quad(const float ray_start[3],
float dist_sq_test;
float co[3], depth_test;
- if (((dist_sq_test = dist_squared_ray_to_tri_v3_fast(
- ray_start, ray_normal, t0, t1, t2, co, &depth_test)) < *dist_sq)) {
+ if ((dist_sq_test = dist_squared_ray_to_tri_v3_fast(
+ ray_start, ray_normal, t0, t1, t2, co, &depth_test)) < *dist_sq) {
*dist_sq = dist_sq_test;
*depth = depth_test;
- if (((dist_sq_test = dist_squared_ray_to_tri_v3_fast(
- ray_start, ray_normal, t0, t2, t3, co, &depth_test)) < *dist_sq)) {
+ if ((dist_sq_test = dist_squared_ray_to_tri_v3_fast(
+ ray_start, ray_normal, t0, t2, t3, co, &depth_test)) < *dist_sq) {
*dist_sq = dist_sq_test;
*depth = depth_test;
}
@@ -2240,8 +2240,8 @@ bool ray_face_nearest_tri(const float ray_start[3],
float dist_sq_test;
float co[3], depth_test;
- if (((dist_sq_test = dist_squared_ray_to_tri_v3_fast(
- ray_start, ray_normal, t0, t1, t2, co, &depth_test)) < *dist_sq)) {
+ if ((dist_sq_test = dist_squared_ray_to_tri_v3_fast(
+ ray_start, ray_normal, t0, t1, t2, co, &depth_test)) < *dist_sq) {
*dist_sq = dist_sq_test;
*depth = depth_test;
return true;
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 70d442021fe..687ee6497b4 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -883,7 +883,7 @@ static void long_edge_queue_edge_add_recursive(
return;
}
- if ((l_edge->radial_next != l_edge)) {
+ if (l_edge->radial_next != l_edge) {
/* How much longer we need to be to consider for subdividing
* (avoids subdividing faces which are only *slightly* skinny) */
# define EVEN_EDGELEN_THRESHOLD 1.2f
diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc
index bf1b1586db8..0d12a26276f 100644
--- a/source/blender/blenkernel/intern/scene.cc
+++ b/source/blender/blenkernel/intern/scene.cc
@@ -745,7 +745,7 @@ static bool seq_foreach_member_id_cb(Sequence *seq, void *user_data)
{ \
CHECK_TYPE(&((_id_super)->id), ID *); \
BKE_lib_query_foreachid_process((_data), (ID **)&(_id_super), (_cb_flag)); \
- if (BKE_lib_query_foreachid_iter_stop((_data))) { \
+ if (BKE_lib_query_foreachid_iter_stop(_data)) { \
return false; \
} \
} \
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index d1451353feb..75f2015cdad 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -750,10 +750,10 @@ static void build_bps_springlist(Object *ob)
}
/* scan for attached inner springs */
for (b = sb->totspring, bs = sb->bspring; b > 0; b--, bs++) {
- if (((sb->totpoint - a) == bs->v1)) {
+ if ((sb->totpoint - a) == bs->v1) {
add_bp_springlist(bp, sb->totspring - b);
}
- if (((sb->totpoint - a) == bs->v2)) {
+ if ((sb->totpoint - a) == bs->v2) {
add_bp_springlist(bp, sb->totspring - b);
}
} /* For springs. */
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index 300ef0c646f..db2a6b658fa 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -299,7 +299,7 @@ static void undosys_stack_clear_all_last(UndoStack *ustack, UndoStep *us)
BLI_assert(us_iter != ustack->step_active);
undosys_step_free_and_unlink(ustack, us_iter);
undosys_stack_validate(ustack, is_not_empty);
- } while ((us != us_iter));
+ } while (us != us_iter);
}
}
@@ -320,7 +320,7 @@ static void undosys_stack_clear_all_first(UndoStack *ustack, UndoStep *us, UndoS
BLI_assert(us_iter != ustack->step_active);
undosys_step_free_and_unlink(ustack, us_iter);
undosys_stack_validate(ustack, is_not_empty);
- } while ((us != us_iter));
+ } while (us != us_iter);
}
}
diff --git a/source/blender/blenkernel/intern/vfont.c b/source/blender/blenkernel/intern/vfont.c
index ddc758c6887..7293e1db5d7 100644
--- a/source/blender/blenkernel/intern/vfont.c
+++ b/source/blender/blenkernel/intern/vfont.c
@@ -1194,7 +1194,7 @@ static bool vfont_to_curve(Object *ob,
/* pass */
}
- if ((mem[j] != '\n') && ((chartransdata[j].dobreak != 0))) {
+ if ((mem[j] != '\n') && (chartransdata[j].dobreak != 0)) {
if (mem[i] == ' ') {
struct TempLineInfo *li;
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 502d3ac6d40..9c2e88f730a 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -1646,7 +1646,7 @@ openvdb::GridBase::ConstPtr BKE_volume_grid_shallow_transform(openvdb::GridBase:
const blender::float4x4 &transform)
{
openvdb::math::Transform::Ptr grid_transform = grid->transform().copy();
- grid_transform->postMult(openvdb::Mat4d(((float *)transform.values)));
+ grid_transform->postMult(openvdb::Mat4d((float *)transform.values));
/* Create a transformed grid. The underlying tree is shared. */
return grid->copyGridReplacingTransform(grid_transform);