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/animation | |
parent | 11abeae99fdbfc8f047c4a3c1d2b9b8c47883516 (diff) |
Cleanup: redundant parenthesis
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/drivers.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 8 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_general.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 8fd3c319452..3a04873588d 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1127,7 +1127,7 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id /* Check for selected nodes. */ if (fcu->rna_path && - (BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name)))) { + BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name))) { /* Get strip name, and check if this strip is selected. */ node = nodeFindNodebyName(ntree, node_name); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index db8088f78bb..f899e41149d 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -322,8 +322,8 @@ int ANIM_add_driver_with_target(ReportList *reports, * then use the first one */ { /* Use the shorter of the two (to avoid out of bounds access) */ - int dst_len = (RNA_property_array_check(prop)) ? RNA_property_array_length(&ptr, prop) : 1; - int src_len = (RNA_property_array_check(prop)) ? RNA_property_array_length(&ptr2, prop2) : 1; + int dst_len = RNA_property_array_check(prop) ? RNA_property_array_length(&ptr, prop) : 1; + int src_len = RNA_property_array_check(prop) ? RNA_property_array_length(&ptr2, prop2) : 1; int len = MIN2(dst_len, src_len); @@ -347,7 +347,7 @@ int ANIM_add_driver_with_target(ReportList *reports, case CREATEDRIVER_MAPPING_1_N: /* 1-N - Specified target index for all */ default: { - int len = (RNA_property_array_check(prop)) ? RNA_property_array_length(&ptr, prop) : 1; + int len = RNA_property_array_check(prop) ? RNA_property_array_length(&ptr, prop) : 1; for (int i = 0; i < len; i++) { done_tot += add_driver_with_target(reports, diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 2a94c5db439..7bb104045c3 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -497,7 +497,7 @@ void ANIM_editkeyframes_refresh(bAnimContext *ac) if (ked && (ked->iterflags & KEYFRAME_ITER_INCL_HANDLES)) { \ /* Only act on visible items, so check handle visibility state. */ \ const bool handles_visible = ((ked->iterflags & KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE) ? \ - (BEZT_ISSEL_ANY(bezt)) : \ + BEZT_ISSEL_ANY(bezt) : \ true); \ if (handles_visible) { \ if (check(0)) { \ @@ -809,7 +809,7 @@ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt) static short snap_bezier_nearest(KeyframeEditData *UNUSED(ked), BezTriple *bezt) { if (bezt->f2 & SELECT) { - bezt->vec[1][0] = (float)(floorf(bezt->vec[1][0] + 0.5f)); + bezt->vec[1][0] = (float)floorf(bezt->vec[1][0] + 0.5f); } return 0; } @@ -1494,7 +1494,7 @@ static short select_bezier_add(KeyframeEditData *ked, BezTriple *bezt) { /* Only act on visible items, so check handle visibility state. */ const bool handles_visible = ked && ((ked->iterflags & KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE) ? - (BEZT_ISSEL_ANY(bezt)) : + BEZT_ISSEL_ANY(bezt) : true); /* if we've got info on what to select, use it, otherwise select all */ @@ -1520,7 +1520,7 @@ static short select_bezier_subtract(KeyframeEditData *ked, BezTriple *bezt) { /* Only act on visible items, so check handle visibility state. */ const bool handles_visible = ked && ((ked->iterflags & KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE) ? - (BEZT_ISSEL_ANY(bezt)) : + BEZT_ISSEL_ANY(bezt) : true); /* if we've got info on what to deselect, use it, otherwise deselect all */ diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 40f0ac59b01..fbe65d6917e 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -151,7 +151,7 @@ void clean_fcurve(struct bAnimContext *ac, bAnimListElem *ale, float thresh, boo * if there is a considerable distance between the points, and also if the * current is further away than the next one is to the previous. */ - if (beztn && (IS_EQT(cur[0], next[0], thresh)) && (IS_EQT(next[1], prev[1], thresh) == 0)) { + if (beztn && IS_EQT(cur[0], next[0], thresh) && (IS_EQT(next[1], prev[1], thresh) == 0)) { /* only add if current is further away from previous */ if (cur[1] > next[1]) { if (IS_EQT(cur[1], prev[1], thresh) == 0) { @@ -654,8 +654,8 @@ void sample_fcurve(FCurve *fcu) * keyframes while sampling will affect the outcome... * - only start sampling+adding from index=1, so that we don't overwrite original keyframe */ - range = (int)(ceil(end->vec[1][0] - start->vec[1][0])); - sfra = (int)(floor(start->vec[1][0])); + range = (int)ceil(end->vec[1][0] - start->vec[1][0]); + sfra = (int)floor(start->vec[1][0]); if (range) { value_cache = MEM_callocN(sizeof(TempFrameValCache) * range, "IcuFrameValCache"); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index acf53541843..c9957b38853 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1180,7 +1180,7 @@ static float *get_keyframe_values(ReportList *reports, { float *values; - if ((flag & INSERTKEY_MATRIX) && (visualkey_can_use(&ptr, prop))) { + if ((flag & INSERTKEY_MATRIX) && visualkey_can_use(&ptr, prop)) { /* visual-keying is only available for object and pchan datablocks, as * it works by keyframing using a value extracted from the final matrix * instead of using the kt system to extract a value. diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index f9feac9c7f6..3448ba1c017 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -888,7 +888,7 @@ bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) /* TODO: check for missing callbacks! */ /* check if it can be used in the current context */ - return (ksi->poll(ksi, C)); + return ksi->poll(ksi, C); } return true; |