diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-05 09:48:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-05 09:54:34 +0300 |
commit | f5acfd9c04697ee046297e1c7b36d0cef9e2440a (patch) | |
tree | 5fe8b83b7f08e6eba5d40a92e0ae30b22d12d0af /source | |
parent | d8582d966fe4ae46c82fcbb69d3d0ca62238ea93 (diff) |
Cleanup: remove redundant parenthesis
Diffstat (limited to 'source')
47 files changed, 94 insertions, 94 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index fae75762cde..10a865880f2 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -426,7 +426,7 @@ bool BKE_animsys_rna_path_resolve(PointerRNA *ptr, } /* less than 1.0 evaluates to false, use epsilon to avoid float error */ -#define ANIMSYS_FLOAT_AS_BOOL(value) ((value) > ((1.0f - FLT_EPSILON))) +#define ANIMSYS_FLOAT_AS_BOOL(value) ((value) > (1.0f - FLT_EPSILON)) bool BKE_animsys_read_from_rna_path(PathResolvedRNA *anim_rna, float *r_value) { @@ -2625,7 +2625,7 @@ static void animsys_create_action_track_strip(const AnimData *adt, bAction *action = adt->action; - if ((adt->flag & ADT_NLA_EDIT_ON)) { + if (adt->flag & ADT_NLA_EDIT_ON) { action = adt->tmpact; } diff --git a/source/blender/blenkernel/intern/autoexec.c b/source/blender/blenkernel/intern/autoexec.c index 07b096af941..3aec646b024 100644 --- a/source/blender/blenkernel/intern/autoexec.c +++ b/source/blender/blenkernel/intern/autoexec.c @@ -56,7 +56,7 @@ bool BKE_autoexec_match(const char *path) if (path_cmp->path[0] == '\0') { /* pass */ } - else if ((path_cmp->flag & USER_PATHCMP_GLOB)) { + else if (path_cmp->flag & USER_PATHCMP_GLOB) { if (fnmatch(path_cmp->path, path, fnmatch_flags) == 0) { return true; } diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 92fd220549a..d33697d551e 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -4153,7 +4153,7 @@ static void BKE_fluid_modifier_process( { const int scene_framenr = (int)DEG_get_ctime(depsgraph); - if ((fmd->type & MOD_FLUID_TYPE_FLOW)) { + if (fmd->type & MOD_FLUID_TYPE_FLOW) { BKE_fluid_modifier_processFlow(fmd, depsgraph, scene, ob, me, scene_framenr); } else if (fmd->type & MOD_FLUID_TYPE_EFFEC) { diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 38687fa47b2..072304566e5 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -571,7 +571,7 @@ static void lib_override_linked_group_tag_recursive(LibOverrideGroupTagData *dat * would use one of those. * NOTE: missing IDs (aka placeholders) are never overridden. */ if (ELEM(GS(to_id->name), ID_OB, ID_GR)) { - if ((to_id->tag & LIB_TAG_MISSING)) { + if (to_id->tag & LIB_TAG_MISSING) { to_id->tag |= missing_tag; } else { @@ -604,7 +604,7 @@ static void lib_override_linked_group_tag(LibOverrideGroupTagData *data) const bool is_resync = data->is_resync; BLI_assert(!data->is_override); - if ((id_root->tag & LIB_TAG_MISSING)) { + if (id_root->tag & LIB_TAG_MISSING) { id_root->tag |= data->missing_tag; } else { @@ -654,7 +654,7 @@ static void lib_override_linked_group_tag(LibOverrideGroupTagData *data) if (instantiating_collection == NULL && instantiating_collection_override_candidate != NULL) { - if ((instantiating_collection_override_candidate->id.tag & LIB_TAG_MISSING)) { + if (instantiating_collection_override_candidate->id.tag & LIB_TAG_MISSING) { instantiating_collection_override_candidate->id.tag |= data->missing_tag; } else { @@ -730,7 +730,7 @@ static void lib_override_overrides_group_tag(LibOverrideGroupTagData *data) BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id_root)); BLI_assert(data->is_override); - if ((id_root->override_library->reference->tag & LIB_TAG_MISSING)) { + if (id_root->override_library->reference->tag & LIB_TAG_MISSING) { id_root->tag |= data->missing_tag; } else { diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 461ffa7765e..ca1fada8c76 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -1026,7 +1026,7 @@ static void pbvh_update_normals_accum_task_cb(void *__restrict userdata, PBVHNode *node = data->nodes[n]; float(*vnors)[3] = data->vnors; - if ((node->flag & PBVH_UpdateNormals)) { + if (node->flag & PBVH_UpdateNormals) { unsigned int mpoly_prev = UINT_MAX; float fn[3]; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index a6adff35a7f..57225872c7e 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -3369,7 +3369,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) } /* NOTE: breaking baking should leave calculated frames in cache, not clear it */ - if ((cancel || G.is_break)) { + if (cancel || G.is_break) { break; } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 6d60f5e91b4..9dab276af95 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2178,7 +2178,7 @@ int BKE_scene_base_iter_next( /* exception: empty scene layer */ while ((*scene)->set) { (*scene) = (*scene)->set; - ViewLayer *view_layer_set = BKE_view_layer_default_render((*scene)); + ViewLayer *view_layer_set = BKE_view_layer_default_render(*scene); if (view_layer_set->object_bases.first) { *base = view_layer_set->object_bases.first; *ob = (*base)->object; @@ -2199,7 +2199,7 @@ int BKE_scene_base_iter_next( /* (*scene) is finished, now do the set */ while ((*scene)->set) { (*scene) = (*scene)->set; - ViewLayer *view_layer_set = BKE_view_layer_default_render((*scene)); + ViewLayer *view_layer_set = BKE_view_layer_default_render(*scene); if (view_layer_set->object_bases.first) { *base = view_layer_set->object_bases.first; *ob = (*base)->object; @@ -2898,7 +2898,7 @@ Base *_setlooper_base_step(Scene **sce_iter, ViewLayer *view_layer, Base *base) next_set: /* Reached the end, get the next base in the set. */ while ((*sce_iter = (*sce_iter)->set)) { - ViewLayer *view_layer_set = BKE_view_layer_default_render((*sce_iter)); + ViewLayer *view_layer_set = BKE_view_layer_default_render(*sce_iter); base = (Base *)view_layer_set->object_bases.first; if (base) { @@ -3118,7 +3118,7 @@ bool BKE_scene_multiview_is_render_view_active(const RenderData *rd, const Scene return false; } - if ((srv->viewflag & SCE_VIEW_DISABLE)) { + if (srv->viewflag & SCE_VIEW_DISABLE) { return false; } diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index dc5162f201e..95436372a65 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -475,7 +475,7 @@ static void studiolight_load_equirect_image(StudioLight *sl) NULL, (failed || (specular_ibuf == NULL)) ? magenta : black, 1, 1, 4); } - if ((sl->flag & STUDIOLIGHT_TYPE_MATCAP)) { + if (sl->flag & STUDIOLIGHT_TYPE_MATCAP) { sl->matcap_diffuse.ibuf = diffuse_ibuf; sl->matcap_specular.ibuf = specular_ibuf; if (specular_ibuf != NULL) { @@ -1192,7 +1192,7 @@ static void studiolight_add_files_from_datafolder(const int folder_id, uint totfile = BLI_filelist_dir_contents(folder, &dir); int i; for (i = 0; i < totfile; i++) { - if ((dir[i].type & S_IFREG)) { + if (dir[i].type & S_IFREG) { studiolight_add_file(dir[i].path, flag); } } @@ -1473,7 +1473,7 @@ struct StudioLight *BKE_studiolight_find_default(int flag) } LISTBASE_FOREACH (StudioLight *, sl, &studiolights) { - if ((sl->flag & flag)) { + if (sl->flag & flag) { return sl; } } @@ -1484,7 +1484,7 @@ struct StudioLight *BKE_studiolight_find(const char *name, int flag) { LISTBASE_FOREACH (StudioLight *, sl, &studiolights) { if (STREQLEN(sl->name, name, FILE_MAXFILE)) { - if ((sl->flag & flag)) { + if (sl->flag & flag) { return sl; } @@ -1542,32 +1542,32 @@ void BKE_studiolight_ensure_flag(StudioLight *sl, int flag) return; } - if ((flag & STUDIOLIGHT_EXTERNAL_IMAGE_LOADED)) { + if (flag & STUDIOLIGHT_EXTERNAL_IMAGE_LOADED) { studiolight_load_equirect_image(sl); } - if ((flag & STUDIOLIGHT_RADIANCE_BUFFERS_CALCULATED)) { + if (flag & STUDIOLIGHT_RADIANCE_BUFFERS_CALCULATED) { studiolight_calculate_radiance_cubemap_buffers(sl); } - if ((flag & STUDIOLIGHT_SPHERICAL_HARMONICS_COEFFICIENTS_CALCULATED)) { + if (flag & STUDIOLIGHT_SPHERICAL_HARMONICS_COEFFICIENTS_CALCULATED) { if (!studiolight_load_spherical_harmonics_coefficients(sl)) { studiolight_calculate_diffuse_light(sl); } } - if ((flag & STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE)) { + if (flag & STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE) { studiolight_create_equirect_radiance_gputexture(sl); } - if ((flag & STUDIOLIGHT_EQUIRECT_IRRADIANCE_GPUTEXTURE)) { + if (flag & STUDIOLIGHT_EQUIRECT_IRRADIANCE_GPUTEXTURE) { studiolight_create_equirect_irradiance_gputexture(sl); } - if ((flag & STUDIOLIGHT_EQUIRECT_IRRADIANCE_IMAGE_CALCULATED)) { + if (flag & STUDIOLIGHT_EQUIRECT_IRRADIANCE_IMAGE_CALCULATED) { if (!studiolight_load_irradiance_equirect_image(sl)) { studiolight_calculate_irradiance_equirect_image(sl); } } - if ((flag & STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE)) { + if (flag & STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE) { studiolight_create_matcap_diffuse_gputexture(sl); } - if ((flag & STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE)) { + if (flag & STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE) { studiolight_create_matcap_specular_gputexture(sl); } } diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c index f107fc4d6bc..92ff0911cf3 100644 --- a/source/blender/blenkernel/intern/tracking_auto.c +++ b/source/blender/blenkernel/intern/tracking_auto.c @@ -322,7 +322,7 @@ static bool tracking_check_marker_margin(const libmv_Marker *libmv_marker, static bool autotrack_is_marker_usable(const MovieTrackingMarker *marker) { - if ((marker->flag & MARKER_DISABLED)) { + if (marker->flag & MARKER_DISABLED) { return false; } return true; @@ -797,7 +797,7 @@ void BKE_autotrack_context_finish(AutoTrackContext *context) clip, context->start_scene_frame); LISTBASE_FOREACH (MovieTrackingPlaneTrack *, plane_track, plane_tracks_base) { - if ((plane_track->flag & PLANE_TRACK_AUTOKEY)) { + if (plane_track->flag & PLANE_TRACK_AUTOKEY) { continue; } for (int track_index = 0; track_index < context->num_all_tracks; track_index++) { diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 9b3103a638b..32057709c38 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -741,7 +741,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context, } } - if ((of->oformat->flags & AVFMT_GLOBALHEADER)) { + if (of->oformat->flags & AVFMT_GLOBALHEADER) { PRINT("Using global header\n"); c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; } diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 823e72a91e5..8afb6b5a2be 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -1787,7 +1787,7 @@ bool isect_ray_tri_v3(const float ray_origin[3], } *r_lambda = f * dot_v3v3(e2, q); - if ((*r_lambda < 0.0f)) { + if (*r_lambda < 0.0f) { return false; } @@ -1864,7 +1864,7 @@ bool isect_ray_tri_epsilon_v3(const float ray_origin[3], } *r_lambda = f * dot_v3v3(e2, q); - if ((*r_lambda < 0.0f)) { + if (*r_lambda < 0.0f) { return false; } @@ -2024,7 +2024,7 @@ bool isect_ray_tri_threshold_v3(const float ray_origin[3], cross_v3_v3v3(q, s, e1); *r_lambda = f * dot_v3v3(e2, q); - if ((*r_lambda < 0.0f)) { + if (*r_lambda < 0.0f) { return false; } @@ -3325,7 +3325,7 @@ bool isect_ray_aabb_v3_simple(const float orig[3], t[5] = (double)(bb_max[2] - orig[2]) * invdirz; hit_dist[0] = (float)fmax(fmax(fmin(t[0], t[1]), fmin(t[2], t[3])), fmin(t[4], t[5])); hit_dist[1] = (float)fmin(fmin(fmax(t[0], t[1]), fmax(t[2], t[3])), fmax(t[4], t[5])); - if ((hit_dist[1] < 0.0f || hit_dist[0] > hit_dist[1])) { + if ((hit_dist[1] < 0.0f) || (hit_dist[0] > hit_dist[1])) { return false; } diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 858f5d85a90..7c644fa3b55 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2390,7 +2390,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Triangulate) { TriangulateModifierData *tmd = (TriangulateModifierData *)md; - if ((tmd->flag & MOD_TRIANGULATE_BEAUTY)) { + if (tmd->flag & MOD_TRIANGULATE_BEAUTY) { tmd->quad_method = MOD_TRIANGULATE_QUAD_BEAUTY; tmd->ngon_method = MOD_TRIANGULATE_NGON_BEAUTY; } diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 95cfc9975d7..81371e1c1ed 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1335,7 +1335,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) ME_OPT_EDGES = (1 << 8), }; - if ((me->flag & ME_SUBSURF)) { + if (me->flag & ME_SUBSURF) { SubsurfModifierData *smd = (SubsurfModifierData *)BKE_modifier_new( eModifierType_Subsurf); diff --git a/source/blender/compositor/operations/COM_CryptomatteOperation.cc b/source/blender/compositor/operations/COM_CryptomatteOperation.cc index 52ae1d6d5b5..1a86fadad76 100644 --- a/source/blender/compositor/operations/COM_CryptomatteOperation.cc +++ b/source/blender/compositor/operations/COM_CryptomatteOperation.cc @@ -57,8 +57,8 @@ void CryptomatteOperation::executePixel(float output[4], int x, int y, void *dat ::memcpy(&m3hash, &input[0], sizeof(uint32_t)); /* Since the red channel is likely to be out of display range, * setting green and blue gives more meaningful images. */ - output[1] = ((float)((m3hash << 8)) / (float)UINT32_MAX); - output[2] = ((float)((m3hash << 16)) / (float)UINT32_MAX); + output[1] = ((float)(m3hash << 8) / (float)UINT32_MAX); + output[2] = ((float)(m3hash << 16) / (float)UINT32_MAX); } for (float hash : m_objectIndex) { if (input[0] == hash) { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc index 6527f165552..c37fb1b83a4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc @@ -65,7 +65,7 @@ void DepsgraphRelationBuilder::build_layer_collections(ListBase *lb) COLLECTION_HIDE_RENDER; for (LayerCollection *lc = (LayerCollection *)lb->first; lc; lc = lc->next) { - if ((lc->collection->flag & visibility_flag)) { + if (lc->collection->flag & visibility_flag) { continue; } if ((lc->flag & LAYER_COLLECTION_EXCLUDE) == 0) { diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h index 453ef9c7f8e..e17bd7d9956 100644 --- a/source/blender/draw/engines/workbench/workbench_private.h +++ b/source/blender/draw/engines/workbench/workbench_private.h @@ -399,7 +399,7 @@ typedef struct WORKBENCH_ViewLayerData { /* inline helper functions */ BLI_INLINE bool workbench_is_specular_highlight_enabled(WORKBENCH_PrivateData *wpd) { - if ((wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT)) { + if (wpd->shading.flag & V3D_SHADING_SPECULAR_HIGHLIGHT) { if (STUDIOLIGHT_ENABLED(wpd) || MATCAP_ENABLED(wpd)) { return (wpd->studio_light->flag & STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS) != 0; } diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index a8cbe7b18b5..11e2856147f 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -512,7 +512,7 @@ static void drw_context_state_init(void) if (DST.draw_ctx.object_mode & OB_MODE_POSE) { DST.draw_ctx.object_pose = DST.draw_ctx.obact; } - else if ((DST.draw_ctx.object_mode & OB_MODE_ALL_WEIGHT_PAINT)) { + else if (DST.draw_ctx.object_mode & OB_MODE_ALL_WEIGHT_PAINT) { DST.draw_ctx.object_pose = BKE_object_pose_armature_get(DST.draw_ctx.obact); } else { diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 7f7696d485c..22356a3c57b 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -283,11 +283,11 @@ void DRW_state_reset_ex(DRWState state) static void drw_state_validate(void) { /* Cannot write to stencil buffer without stencil test. */ - if ((DST.state & DRW_STATE_WRITE_STENCIL_ENABLED)) { + if (DST.state & DRW_STATE_WRITE_STENCIL_ENABLED) { BLI_assert(DST.state & DRW_STATE_STENCIL_TEST_ENABLED); } /* Cannot write to depth buffer without depth test. */ - if ((DST.state & DRW_STATE_WRITE_DEPTH)) { + if (DST.state & DRW_STATE_WRITE_DEPTH) { BLI_assert(DST.state & DRW_STATE_DEPTH_TEST_ENABLED); } } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 1118e84ef4f..3798ca308ed 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -908,7 +908,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op) DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); /* Recalculate paths if any of the bones have paths... */ - if ((ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) { + if (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) { ED_pose_recalculate_paths(C, scene, ob, POSE_PATH_CALC_RANGE_FULL); } @@ -1219,7 +1219,7 @@ static int pose_clear_transform_generic_exec(bContext *C, ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); /* now recalculate paths */ - if ((ob_iter->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) { + if (ob_iter->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) { ED_pose_recalculate_paths(C, scene, ob_iter, POSE_PATH_CALC_RANGE_FULL); } diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index f18cf9712db..579803f7ff7 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -110,7 +110,7 @@ void AssetMarkHelper::reportResults(ReportList &reports) const { /* User feedback on failure. */ if (!wasSuccessful()) { - if ((stats.tot_already_asset > 0)) { + if (stats.tot_already_asset > 0) { BKE_report(&reports, RPT_ERROR, "Selected data-blocks are already assets (or do not support use as assets)"); diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 2be55accd3a..d1fe162fc4a 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -431,7 +431,7 @@ Nurb *ED_curve_add_nurbs_primitive( if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) { ed_editnurb_spin(umat, NULL, obedit, tmp_vec, tmp_cent); } - else if ((U.flag & USER_ADD_VIEWALIGNED)) { + else if (U.flag & USER_ADD_VIEWALIGNED) { ed_editnurb_spin(viewmat, NULL, obedit, zvec, mat[3]); } else { @@ -466,7 +466,7 @@ Nurb *ED_curve_add_nurbs_primitive( if (newob && (U.flag & USER_ADD_VIEWALIGNED) == 0) { ed_editnurb_spin(umat, NULL, obedit, tmp_vec, tmp_cent); } - else if ((U.flag & USER_ADD_VIEWALIGNED)) { + else if (U.flag & USER_ADD_VIEWALIGNED) { ed_editnurb_spin(viewmat, NULL, obedit, zvec, mat[3]); } else { diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index d3a3df98d99..fd75be5b847 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -6173,7 +6173,7 @@ int UI_but_return_value_get(uiBut *but) void UI_but_drag_set_id(uiBut *but, ID *id) { but->dragtype = WM_DRAG_ID; - if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) { + if (but->dragflag & UI_BUT_DRAGPOIN_FREE) { WM_drag_data_free(but->dragtype, but->dragpoin); but->dragflag &= ~UI_BUT_DRAGPOIN_FREE; } @@ -6200,7 +6200,7 @@ void UI_but_drag_set_asset(uiBut *but, but->dragtype = WM_DRAG_ASSET; ui_def_but_icon(but, icon, 0); /* no flag UI_HAS_ICON, so icon doesn't draw in button */ - if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) { + if (but->dragflag & UI_BUT_DRAGPOIN_FREE) { WM_drag_data_free(but->dragtype, but->dragpoin); } but->dragpoin = asset_drag; @@ -6212,7 +6212,7 @@ void UI_but_drag_set_asset(uiBut *but, void UI_but_drag_set_rna(uiBut *but, PointerRNA *ptr) { but->dragtype = WM_DRAG_RNA; - if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) { + if (but->dragflag & UI_BUT_DRAGPOIN_FREE) { WM_drag_data_free(but->dragtype, but->dragpoin); but->dragflag &= ~UI_BUT_DRAGPOIN_FREE; } @@ -6222,7 +6222,7 @@ void UI_but_drag_set_rna(uiBut *but, PointerRNA *ptr) void UI_but_drag_set_path(uiBut *but, const char *path, const bool use_free) { but->dragtype = WM_DRAG_PATH; - if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) { + if (but->dragflag & UI_BUT_DRAGPOIN_FREE) { WM_drag_data_free(but->dragtype, but->dragpoin); but->dragflag &= ~UI_BUT_DRAGPOIN_FREE; } @@ -6235,7 +6235,7 @@ void UI_but_drag_set_path(uiBut *but, const char *path, const bool use_free) void UI_but_drag_set_name(uiBut *but, const char *name) { but->dragtype = WM_DRAG_NAME; - if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) { + if (but->dragflag & UI_BUT_DRAGPOIN_FREE) { WM_drag_data_free(but->dragtype, but->dragpoin); but->dragflag &= ~UI_BUT_DRAGPOIN_FREE; } @@ -6253,7 +6253,7 @@ void UI_but_drag_set_image( { but->dragtype = WM_DRAG_PATH; ui_def_but_icon(but, icon, 0); /* no flag UI_HAS_ICON, so icon doesn't draw in button */ - if ((but->dragflag & UI_BUT_DRAGPOIN_FREE)) { + if (but->dragflag & UI_BUT_DRAGPOIN_FREE) { WM_drag_data_free(but->dragtype, but->dragpoin); but->dragflag &= ~UI_BUT_DRAGPOIN_FREE; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index bfc03a95949..d920ebbe11a 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6779,7 +6779,7 @@ static bool ui_numedit_but_HSVCIRCLE(uiBut *but, ui_color_picker_hsv_to_rgb(hsv, rgb); - if ((cpicker->use_luminosity_lock)) { + if (cpicker->use_luminosity_lock) { if (!is_zero_v3(rgb)) { normalize_v3_length(rgb, cpicker->luminosity_lock_value); } diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 6755eded05c..2d59bfb92c8 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1014,7 +1014,7 @@ static void init_iconfile_list(struct ListBase *list) int index = 1; for (int i = 0; i < totfile; i++) { - if ((dir[i].type & S_IFREG)) { + if (dir[i].type & S_IFREG) { const char *filename = dir[i].relname; if (BLI_path_extension_check(filename, ".png")) { diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 0bc2a224a4b..d8cef889a40 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2906,7 +2906,7 @@ static void areas_do_frame_follow(bContext *C, bool middle) LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { /* do follow here if editor type supports it */ - if ((screen_ctx->redraws_flag & TIME_FOLLOW)) { + if (screen_ctx->redraws_flag & TIME_FOLLOW) { if ((region->regiontype == RGN_TYPE_WINDOW && ELEM(area->spacetype, SPACE_SEQ, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA)) || (area->spacetype == SPACE_CLIP && region->regiontype == RGN_TYPE_PREVIEW)) { diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 771e0e1e47b..e5ca5e4defd 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -190,7 +190,7 @@ static void HC_relaxation_iteration_uv(BMEditMesh *em, /* This is supposed to happen only if "Pin Edges" is on, * since we have initialization on stroke start. * If ever uv brushes get their own mode we should check for toolsettings option too. */ - if ((sculptdata->uv[i].flag & MARK_BOUNDARY)) { + if (sculptdata->uv[i].flag & MARK_BOUNDARY) { continue; } @@ -268,7 +268,7 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, /* This is supposed to happen only if "Pin Edges" is on, * since we have initialization on stroke start. * If ever uv brushes get their own mode we should check for toolsettings option too. */ - if ((sculptdata->uv[i].flag & MARK_BOUNDARY)) { + if (sculptdata->uv[i].flag & MARK_BOUNDARY) { continue; } diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 2d1151c8f4d..776bb0b3bb7 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -969,7 +969,7 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks) BLI_join_dirfile(name, sizeof(name), xdg_runtime_dir, "gvfs/"); const uint dir_len = BLI_filelist_dir_contents(name, &dir); for (uint i = 0; i < dir_len; i++) { - if ((dir[i].type & S_IFDIR)) { + if (dir[i].type & S_IFDIR) { const char *dirname = dir[i].relname; if (dirname[0] != '.') { /* Dir names contain a lot of unwanted text. diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 3f8dea8b533..0472e1264ce 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1139,7 +1139,7 @@ static void draw_seq_strip(const bContext *C, } /* Draw strip offsets when flag is enabled or during "solo preview". */ - if ((sseq->flag & SEQ_SHOW_STRIP_OVERLAY)) { + if (sseq->flag & SEQ_SHOW_STRIP_OVERLAY) { if (!is_single_image && (seq->startofs || seq->endofs) && pixely > 0) { if ((sseq->draw_flag & SEQ_DRAW_OFFSET_EXT) || (seq == special_seq_update)) { draw_sequence_extensions_overlay(scene, seq, pos, pixely); diff --git a/source/blender/editors/space_sequencer/sequencer_proxy.c b/source/blender/editors/space_sequencer/sequencer_proxy.c index 2dcc2d389d9..16d14b5fa72 100644 --- a/source/blender/editors/space_sequencer/sequencer_proxy.c +++ b/source/blender/editors/space_sequencer/sequencer_proxy.c @@ -131,7 +131,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list"); LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) { - if ((seq->flag & SELECT)) { + if (seq->flag & SELECT) { ListBase queue = {NULL, NULL}; LinkData *link; short stop = 0, do_update; @@ -197,7 +197,7 @@ static int sequencer_enable_proxies_exec(bContext *C, wmOperator *op) } LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) { - if ((seq->flag & SELECT)) { + if (seq->flag & SELECT) { if (ELEM(seq->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE)) { SEQ_proxy_set(seq, turnon); if (seq->strip->proxy == NULL) { diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index c5385e24d2c..a0a9cdd96b1 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -292,7 +292,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *op) } for (seq = ed->seqbasep->first; seq; seq = seq->next) { - if ((seq->flag & SELECT)) { + if (seq->flag & SELECT) { xmin = min_ii(xmin, seq->startdisp); xmax = max_ii(xmax, seq->enddisp); diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index 09936b41a74..1ac241013ed 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -548,7 +548,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op) walk->teleport.duration = U.walk_navigation.teleport_time; walk->mouse_speed = U.walk_navigation.mouse_speed; - if ((U.walk_navigation.flag & USER_WALK_GRAVITY)) { + if (U.walk_navigation.flag & USER_WALK_GRAVITY) { walk_navigation_mode_set(walk, WALK_MODE_GRAVITY); } else { @@ -563,7 +563,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op) walk->gravity_state = WALK_GRAVITY_STATE_OFF; - if ((walk->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY)) { + if (walk->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) { walk->gravity = fabsf(walk->scene->physics_settings.gravity[2]); } else { @@ -1199,11 +1199,11 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) direction = 0; - if ((walk->active_directions & WALK_BIT_FORWARD)) { + if (walk->active_directions & WALK_BIT_FORWARD) { direction += 1; } - if ((walk->active_directions & WALK_BIT_BACKWARD)) { + if (walk->active_directions & WALK_BIT_BACKWARD) { direction -= 1; } @@ -1223,11 +1223,11 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) direction = 0; - if ((walk->active_directions & WALK_BIT_LEFT)) { + if (walk->active_directions & WALK_BIT_LEFT) { direction += 1; } - if ((walk->active_directions & WALK_BIT_RIGHT)) { + if (walk->active_directions & WALK_BIT_RIGHT) { direction -= 1; } @@ -1245,11 +1245,11 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) direction = 0; - if ((walk->active_directions & WALK_BIT_UP)) { + if (walk->active_directions & WALK_BIT_UP) { direction -= 1; } - if ((walk->active_directions & WALK_BIT_DOWN)) { + if (walk->active_directions & WALK_BIT_DOWN) { direction = 1; } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 5ec3e9cae5a..2ce5684e874 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2156,7 +2156,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, for (a = 0; a < hits; a++) { if (has_bones) { /* skip non-bone objects */ - if ((buffer[4 * a + 3] & 0xFFFF0000)) { + if (buffer[4 * a + 3] & 0xFFFF0000) { if (base->object->runtime.select_id == (buffer[(4 * a) + 3] & 0xFFFF)) { basact = base; } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index efcf7d587e1..96b84bd2a35 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1828,7 +1828,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve if ((t->flag & T_EDIT) && t->obedit_type == OB_MESH) { FOREACH_TRANS_DATA_CONTAINER (t, tc) { - if ((((Mesh *)(tc->obedit->data))->flag & ME_AUTOSMOOTH)) { + if (((Mesh *)(tc->obedit->data))->flag & ME_AUTOSMOOTH) { BMEditMesh *em = NULL; /* BKE_editmesh_from_object(t->obedit); */ bool do_skip = false; diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index 1f1b1f8db97..f56d60b7376 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -1515,7 +1515,7 @@ int transform_convert_pose_transflags_update(Object *ob, for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { bone = pchan->bone; if (PBONE_VISIBLE(arm, bone)) { - if ((bone->flag & BONE_SELECTED)) { + if (bone->flag & BONE_SELECTED) { bone->flag |= BONE_TRANSFORM; } else { diff --git a/source/blender/editors/transform/transform_snap_sequencer.c b/source/blender/editors/transform/transform_snap_sequencer.c index a1f396eb503..6e926f36fba 100644 --- a/source/blender/editors/transform/transform_snap_sequencer.c +++ b/source/blender/editors/transform/transform_snap_sequencer.c @@ -141,7 +141,7 @@ static SeqCollection *query_snap_targets(const TransInfo *t, SeqCollection *snap const short snap_flag = SEQ_tool_settings_snap_flag_get(t->scene); SeqCollection *snap_targets = SEQ_collection_create(__func__); LISTBASE_FOREACH (Sequence *, seq, seqbase) { - if ((seq->flag & SELECT)) { + if (seq->flag & SELECT) { continue; /* Selected are being transformed. */ } if ((seq->flag & SEQ_MUTE) && (snap_flag & SEQ_SNAP_IGNORE_MUTED)) { diff --git a/source/blender/editors/uvedit/uvedit_select.c b/source/blender/editors/uvedit/uvedit_select.c index 4c597d80534..5a82cd31112 100644 --- a/source/blender/editors/uvedit/uvedit_select.c +++ b/source/blender/editors/uvedit/uvedit_select.c @@ -3912,7 +3912,7 @@ BMLoop **ED_uvedit_selected_verts(Scene *scene, BMesh *bm, int len_max, int *r_v BM_ITER_ELEM (l_iter, &liter, f, BM_LOOPS_OF_FACE) { if (!BM_elem_flag_test(l_iter, BM_ELEM_TAG)) { const MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l_iter, cd_loop_uv_offset); - if ((luv->flag & MLOOPUV_VERTSEL)) { + if (luv->flag & MLOOPUV_VERTSEL) { BM_elem_flag_enable(l_iter->v, BM_ELEM_TAG); verts[verts_len++] = l_iter; diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index db85292c6c0..2d0021a1fe8 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -266,7 +266,7 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject * cumap = (CurveMapping *)py_srna->ptr.data; BKE_curvemapping_init(cumap); /* disable extrapolation if enabled */ - if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) { + if (cumap->flag & CUMA_EXTEND_EXTRAPOLATE) { cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; BKE_curvemapping_changed(cumap, false); } diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index afb23690a84..b1aea8bf6cf 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -527,7 +527,7 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, fe = fe->nextEdge(); continue; } - if ((maxCard < qiMajority)) { + if (maxCard < qiMajority) { // ARB: change &wFace to wFace and use reference in called function tmpQI = computeVisibility<G, I>( ioViewMap, fe, grid, epsilon, *ve, &wFace, &foundOccluders); @@ -725,7 +725,7 @@ static void computeDetailedVisibility(ViewMap *ioViewMap, fe = fe->nextEdge(); continue; } - if ((maxCard < qiMajority)) { + if (maxCard < qiMajority) { // ARB: change &wFace to wFace and use reference in called function tmpQI = computeVisibility<G, I>( ioViewMap, fe, grid, epsilon, *ve, &wFace, &foundOccluders); @@ -891,7 +891,7 @@ static void computeFastVisibility(ViewMap *ioViewMap, G &grid, real epsilon) continue; } if (even_test) { - if ((maxCard < qiMajority)) { + if (maxCard < qiMajority) { // ARB: change &wFace to wFace and use reference in called function tmpQI = computeVisibility<G, I>( ioViewMap, fe, grid, epsilon, *ve, &wFace, &foundOccluders); @@ -1607,7 +1607,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, real epsilo memset(qiClasses, 0, 256 * sizeof(*qiClasses)); set<ViewShape *> occluders; do { - if ((maxCard < qiMajority)) { + if (maxCard < qiMajority) { tmpQI = ComputeRayCastingVisibility(fe, _Grid, epsilon, occluders, &aFace, timestamp++); #if LOGGING @@ -1763,7 +1763,7 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, real ep fe = (*ve)->fedgeA(); do { if (even_test) { - if ((maxCard < qiMajority)) { + if (maxCard < qiMajority) { tmpQI = ComputeRayCastingVisibility(fe, _Grid, epsilon, occluders, &aFace, timestamp++); // ARB: This is an error condition, not an alert condition. diff --git a/source/blender/io/avi/intern/avi_endian.c b/source/blender/io/avi/intern/avi_endian.c index 146206cd917..36cee7bcadc 100644 --- a/source/blender/io/avi/intern/avi_endian.c +++ b/source/blender/io/avi/intern/avi_endian.c @@ -42,7 +42,7 @@ static void invert(int *val) { int tval = *val; - *val = ((tval >> 24)) | ((tval << 8) & 0x00ff0000) | ((tval >> 8) & 0x0000ff00) | ((tval << 24)); + *val = (tval >> 24) | ((tval << 8) & 0x00ff0000) | ((tval >> 8) & 0x0000ff00) | (tval << 24); } static void sinvert(short int *val) diff --git a/source/blender/nodes/composite/nodes/node_composite_switchview.c b/source/blender/nodes/composite/nodes/node_composite_switchview.c index 3ffad8216de..ec5c79cc087 100644 --- a/source/blender/nodes/composite/nodes/node_composite_switchview.c +++ b/source/blender/nodes/composite/nodes/node_composite_switchview.c @@ -132,7 +132,7 @@ static void init_switch_view(const bContext *C, PointerRNA *ptr) for (nr = 0, srv = rd->views.first; srv; srv = srv->next, nr++) { sock = ntreeCompositSwitchViewAddSocket(ntree, node, srv->name); - if ((srv->viewflag & SCE_VIEW_DISABLE)) { + if (srv->viewflag & SCE_VIEW_DISABLE) { sock->flag |= SOCK_HIDDEN; } } diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 8f4e07c30d3..d0c745e6a1d 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -443,7 +443,7 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key, } if (value) { - /* dvert[group_index] = 0.5 */ + /* Handle `dvert[group_index] = 0.5`. */ if (i < 0) { PyErr_SetString(PyExc_KeyError, "BMDeformVert[key] = x: " @@ -453,7 +453,7 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key, MDeformWeight *dw = BKE_defvert_ensure_index(self->data, i); const float f = PyFloat_AsDouble(value); - if (f == -1 && PyErr_Occurred()) { // parsed key not a number + if (f == -1 && PyErr_Occurred()) { /* Parsed key not a number. */ PyErr_SetString(PyExc_TypeError, "BMDeformVert[key] = x: " "assigned value not a number"); @@ -463,7 +463,7 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key, dw->weight = clamp_f(f, 0.0f, 1.0f); } else { - /* del dvert[group_index] */ + /* Handle `del dvert[group_index]`. */ MDeformWeight *dw = BKE_defvert_find_index(self->data, i); if (dw == NULL) { diff --git a/source/blender/python/intern/bpy_gizmo_wrap.c b/source/blender/python/intern/bpy_gizmo_wrap.c index 42e0c7d0003..a05ec6b7000 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.c +++ b/source/blender/python/intern/bpy_gizmo_wrap.c @@ -79,7 +79,7 @@ static bool bpy_gizmotype_target_property_def(wmGizmoType *gzt, PyObject *item) goto fail; } - if ((params.array_length < 1 || params.array_length > RNA_MAX_ARRAY_LENGTH)) { + if ((params.array_length < 1) || (params.array_length > RNA_MAX_ARRAY_LENGTH)) { PyErr_SetString(PyExc_ValueError, "'array_length' out of range"); goto fail; } diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c index aa8cf8f2a9f..62f5a17c4dd 100644 --- a/source/blender/python/intern/bpy_utils_units.c +++ b/source/blender/python/intern/bpy_utils_units.c @@ -114,7 +114,7 @@ static PyObject *py_structseq_from_strings(PyTypeObject *py_type, BLI_assert(py_struct_seq != NULL); for (str_iter = str_items; *str_iter; str_iter++) { - PyStructSequence_SET_ITEM(py_struct_seq, pos++, PyUnicode_FromString((*str_iter))); + PyStructSequence_SET_ITEM(py_struct_seq, pos++, PyUnicode_FromString(*str_iter)); } return py_struct_seq; diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index 333ee9ecd33..479ad9209f0 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -2524,7 +2524,7 @@ void RE_RenderAnim(Render *re, if (G.is_break == true) { /* remove touched file */ if (is_movie == false && do_write_file) { - if ((rd.mode & R_TOUCH)) { + if (rd.mode & R_TOUCH) { if (!is_multiview_name) { if ((BLI_file_size(name) == 0)) { /* BLI_exists(name) is implicit */ diff --git a/source/blender/render/intern/render_result.c b/source/blender/render/intern/render_result.c index 693cddbebbe..091f5964291 100644 --- a/source/blender/render/intern/render_result.c +++ b/source/blender/render/intern/render_result.c @@ -784,7 +784,7 @@ void render_result_views_new(RenderResult *rr, const RenderData *rd) render_result_views_free(rr); /* check renderdata for amount of views */ - if ((rd->scemode & R_MULTIVIEW)) { + if (rd->scemode & R_MULTIVIEW) { for (srv = rd->views.first; srv; srv = srv->next) { if (BKE_scene_multiview_is_render_view_active(rd, srv) == false) { continue; diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c index 92ca0b87527..1c736647084 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.c +++ b/source/blender/windowmanager/intern/wm_gesture_ops.c @@ -585,7 +585,7 @@ void wm_tweakevent_test(bContext *C, const wmEvent *event, int action) } else { /* no tweaks if event was handled */ - if ((action & WM_HANDLER_BREAK)) { + if (action & WM_HANDLER_BREAK) { WM_gesture_end(win, win->tweak); } else { diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index c75174dfff0..0f450624691 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -121,7 +121,7 @@ static bool parse_int_relative(const char *str, *r_err_msg = msg; return false; } - if ((errno == ERANGE) || ((value < INT_MIN || value > INT_MAX))) { + if ((errno == ERANGE) || ((value < INT_MIN) || (value > INT_MAX))) { static const char *msg = "exceeds range"; *r_err_msg = msg; return false; @@ -225,7 +225,7 @@ static bool parse_int_strict_range(const char *str, *r_err_msg = msg; return false; } - if ((errno == ERANGE) || ((value < min || value > max))) { + if ((errno == ERANGE) || ((value < min) || (value > max))) { static const char *msg = "exceeds range"; *r_err_msg = msg; return false; |