diff options
Diffstat (limited to 'source/blender')
34 files changed, 57 insertions, 57 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc index 563f05691ae..fe5e656d55d 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.cc +++ b/source/blender/blenkernel/intern/gpencil_geom.cc @@ -2629,7 +2629,7 @@ static int gpencil_material_find_index_by_name(Object *ob, const char *name) { for (int i = 0; i < ob->totcol; i++) { Material *ma = BKE_object_material_get(ob, i + 1); - if ((ma != nullptr) && (ma->gp_style != nullptr) && (STREQ(ma->id.name + 2, name))) { + if ((ma != nullptr) && (ma->gp_style != nullptr) && STREQ(ma->id.name + 2, name)) { return i; } } diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 567b99216e5..f6e19277993 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -2986,7 +2986,7 @@ static void image_free_tile(Image *ima, ImageTile *tile) for (int i = 0; i < TEXTARGET_COUNT; i++) { /* Only two textures depends on all tiles, so if this is a secondary tile we can keep the other * two. */ - if (tile != ima->tiles.first && !(ELEM(i, TEXTARGET_2D_ARRAY, TEXTARGET_TILE_MAPPING))) { + if (tile != ima->tiles.first && !ELEM(i, TEXTARGET_2D_ARRAY, TEXTARGET_TILE_MAPPING)) { continue; } diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index 05ef6dc0b54..4c6ecff60ad 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -361,10 +361,10 @@ static Mesh *mesh_nurbs_displist_to_mesh(const Curve *cu, const ListBase *dispba mloopuv->uv[1] = (v % dl->nr) / float(orco_sizeu); /* cyclic correction */ - if ((ELEM(i, 1, 2)) && mloopuv->uv[0] == 0.0f) { + if (ELEM(i, 1, 2) && mloopuv->uv[0] == 0.0f) { mloopuv->uv[0] = 1.0f; } - if ((ELEM(i, 0, 1)) && mloopuv->uv[1] == 0.0f) { + if (ELEM(i, 0, 1) && mloopuv->uv[1] == 0.0f) { mloopuv->uv[1] = 1.0f; } } diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index 450c6f36568..154840e2ef7 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -835,7 +835,7 @@ struct LoopSplitTaskDataCommon { #define INDEX_UNSET INT_MIN #define INDEX_INVALID -1 /* See comment about edge_to_loops below. */ -#define IS_EDGE_SHARP(_e2l) (ELEM((_e2l)[1], INDEX_UNSET, INDEX_INVALID)) +#define IS_EDGE_SHARP(_e2l) ELEM((_e2l)[1], INDEX_UNSET, INDEX_INVALID) static void mesh_edges_sharp_tag(LoopSplitTaskDataCommon *data, const bool check_angle, diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index bc4fb3191e3..4ed0bf12cb6 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -1417,8 +1417,8 @@ void nodeUnregisterType(bNodeType *nt) bool nodeTypeUndefined(const bNode *node) { return (node->typeinfo == &NodeTypeUndefined) || - ((ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP)) && node->id && - ID_IS_LINKED(node->id) && (node->id->tag & LIB_TAG_MISSING)); + (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP) && node->id && ID_IS_LINKED(node->id) && + (node->id->tag & LIB_TAG_MISSING)); } GHashIterator *nodeTypeGetIterator() diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 0e5cb446802..20ba47efaa0 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -1402,15 +1402,15 @@ ModifierData *BKE_object_active_modifier(const Object *ob) bool BKE_object_supports_modifiers(const Object *ob) { - return (ELEM(ob->type, - OB_MESH, - OB_CURVES, - OB_CURVES_LEGACY, - OB_SURF, - OB_FONT, - OB_LATTICE, - OB_POINTCLOUD, - OB_VOLUME)); + return ELEM(ob->type, + OB_MESH, + OB_CURVES, + OB_CURVES_LEGACY, + OB_SURF, + OB_FONT, + OB_LATTICE, + OB_POINTCLOUD, + OB_VOLUME); } bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type) @@ -5450,7 +5450,7 @@ bool BKE_object_modifier_update_subframe(Depsgraph *depsgraph, } /* Skip sub-frame if object is parented to vertex of a dynamic paint canvas. */ - if (no_update && (ELEM(ob->partype, PARVERT1, PARVERT3))) { + if (no_update && ELEM(ob->partype, PARVERT1, PARVERT3)) { return false; } diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc index cff17bf186d..f789aa157e9 100644 --- a/source/blender/blenloader/intern/writefile.cc +++ b/source/blender/blenloader/intern/writefile.cc @@ -126,8 +126,8 @@ /* ********* my write, buffered writing with minimum size chunks ************ */ /* Use optimal allocation since blocks of this size are kept in memory for undo. */ -#define MEM_BUFFER_SIZE (MEM_SIZE_OPTIMAL(1 << 17)) /* 128kb */ -#define MEM_CHUNK_SIZE (MEM_SIZE_OPTIMAL(1 << 15)) /* ~32kb */ +#define MEM_BUFFER_SIZE MEM_SIZE_OPTIMAL(1 << 17) /* 128kb */ +#define MEM_CHUNK_SIZE MEM_SIZE_OPTIMAL(1 << 15) /* ~32kb */ #define ZSTD_BUFFER_SIZE (1 << 21) /* 2mb */ #define ZSTD_CHUNK_SIZE (1 << 20) /* 1mb */ diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cc b/source/blender/compositor/operations/COM_AntiAliasOperation.cc index de01d0c8bf7..e0083b702e1 100644 --- a/source/blender/compositor/operations/COM_AntiAliasOperation.cc +++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cc @@ -34,7 +34,7 @@ static int extrapolate9(float *E0, do { \ *DST = *SRC; \ } while (0) - if ((!PEQ(B, H)) && (!PEQ(D, F))) { + if (!PEQ(B, H) && !PEQ(D, F)) { if (PEQ(D, B)) { PCPY(E0, D); } diff --git a/source/blender/depsgraph/intern/node/deg_node_component.cc b/source/blender/depsgraph/intern/node/deg_node_component.cc index 640f529f7fb..718097b4ef8 100644 --- a/source/blender/depsgraph/intern/node/deg_node_component.cc +++ b/source/blender/depsgraph/intern/node/deg_node_component.cc @@ -54,7 +54,7 @@ string ComponentNode::OperationIDKey::identifier() const bool ComponentNode::OperationIDKey::operator==(const OperationIDKey &other) const { - return (opcode == other.opcode) && (STREQ(name, other.name)) && (name_tag == other.name_tag); + return (opcode == other.opcode) && STREQ(name, other.name) && (name_tag == other.name_tag); } uint64_t ComponentNode::OperationIDKey::hash() const diff --git a/source/blender/draw/engines/eevee_next/eevee_light.cc b/source/blender/draw/engines/eevee_next/eevee_light.cc index b60246fa3ab..8a5de15229d 100644 --- a/source/blender/draw/engines/eevee_next/eevee_light.cc +++ b/source/blender/draw/engines/eevee_next/eevee_light.cc @@ -154,8 +154,8 @@ float Light::attenuation_radius_get(const ::Light *la, float light_threshold, fl void Light::shape_parameters_set(const ::Light *la, const float scale[3]) { if (la->type == LA_AREA) { - float area_size_y = (ELEM(la->area_shape, LA_AREA_RECT, LA_AREA_ELLIPSE)) ? la->area_sizey : - la->area_size; + float area_size_y = ELEM(la->area_shape, LA_AREA_RECT, LA_AREA_ELLIPSE) ? la->area_sizey : + la->area_size; _area_size_x = max_ff(0.003f, la->area_size * scale[0] * 0.5f); _area_size_y = max_ff(0.003f, area_size_y * scale[1] * 0.5f); /* For volume point lighting. */ diff --git a/source/blender/draw/engines/overlay/overlay_gpencil.cc b/source/blender/draw/engines/overlay/overlay_gpencil.cc index f72bf81bf57..7e59a513437 100644 --- a/source/blender/draw/engines/overlay/overlay_gpencil.cc +++ b/source/blender/draw/engines/overlay/overlay_gpencil.cc @@ -96,7 +96,7 @@ void OVERLAY_edit_gpencil_cache_init(OVERLAY_Data *vedata) (GPENCIL_EDIT_MODE(gpd) && (ts->gpencil_selectmode_edit != GP_SELECTMODE_STROKE)); - if ((!GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) && + if (!GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd) && ((!GPENCIL_VERTEX_MODE(gpd) && !GPENCIL_PAINT_MODE(gpd)) || use_vertex_mask)) { DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA; diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.cc b/source/blender/editors/gpencil/gpencil_bake_animation.cc index 927bb83ef51..50d5b43822a 100644 --- a/source/blender/editors/gpencil/gpencil_bake_animation.cc +++ b/source/blender/editors/gpencil/gpencil_bake_animation.cc @@ -86,7 +86,7 @@ static bool gpencil_bake_grease_pencil_animation_poll(bContext *C) } /* Check if grease pencil or empty for dupli groups. */ - if ((obact == nullptr) || (!ELEM(obact->type, OB_GPENCIL, OB_EMPTY))) { + if ((obact == nullptr) || !ELEM(obact->type, OB_GPENCIL, OB_EMPTY)) { return false; } diff --git a/source/blender/editors/interface/interface_query.cc b/source/blender/editors/interface/interface_query.cc index 63dc3017da0..8a940ce14ee 100644 --- a/source/blender/editors/interface/interface_query.cc +++ b/source/blender/editors/interface/interface_query.cc @@ -84,7 +84,7 @@ bool ui_but_is_interactive_ex(const uiBut *but, const bool labeledit, const bool return false; } if ((but->type == UI_BTYPE_TEXT) && - (ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS)) && !labeledit) { + ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS) && !labeledit) { return false; } if ((but->type == UI_BTYPE_LISTROW) && labeledit) { @@ -103,7 +103,7 @@ bool UI_but_is_utf8(const uiBut *but) { if (but->rnaprop) { const int subtype = RNA_property_subtype(but->rnaprop); - return !(ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING)); + return !ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING); } return !(but->flag & UI_BUT_NO_UTF8); } diff --git a/source/blender/editors/interface/interface_region_popup.cc b/source/blender/editors/interface/interface_region_popup.cc index daa46b150a3..e93bc4c4bfe 100644 --- a/source/blender/editors/interface/interface_region_popup.cc +++ b/source/blender/editors/interface/interface_region_popup.cc @@ -165,10 +165,10 @@ static void ui_popup_block_position(wmWindow *window, dir1 &= (UI_DIR_UP | UI_DIR_DOWN); } - if ((dir2 == 0) && (ELEM(dir1, UI_DIR_LEFT, UI_DIR_RIGHT))) { + if ((dir2 == 0) && ELEM(dir1, UI_DIR_LEFT, UI_DIR_RIGHT)) { dir2 = UI_DIR_DOWN; } - if ((dir2 == 0) && (ELEM(dir1, UI_DIR_UP, UI_DIR_DOWN))) { + if ((dir2 == 0) && ELEM(dir1, UI_DIR_UP, UI_DIR_DOWN)) { dir2 = UI_DIR_LEFT; } diff --git a/source/blender/editors/interface/interface_utils.cc b/source/blender/editors/interface/interface_utils.cc index 139d3c9353f..423eefce3f3 100644 --- a/source/blender/editors/interface/interface_utils.cc +++ b/source/blender/editors/interface/interface_utils.cc @@ -435,7 +435,7 @@ eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, /* Only buttons that can be edited as text. */ const bool use_activate_init = ((prop == prop_activate_init) && - (ELEM(type, PROP_STRING, PROP_INT, PROP_FLOAT))); + ELEM(type, PROP_STRING, PROP_INT, PROP_FLOAT)); if (use_activate_init) { uiLayoutSetActivateInit(col, true); diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc index c852fd25bc4..e849fd95084 100644 --- a/source/blender/editors/sculpt_paint/paint_image.cc +++ b/source/blender/editors/sculpt_paint/paint_image.cc @@ -328,7 +328,7 @@ bool paint_use_opacity_masking(Brush *brush) { return ((brush->flag & BRUSH_AIRBRUSH) || (brush->flag & BRUSH_DRAG_DOT) || (brush->flag & BRUSH_ANCHORED) || - (ELEM(brush->imagepaint_tool, PAINT_TOOL_SMEAR, PAINT_TOOL_SOFTEN)) || + ELEM(brush->imagepaint_tool, PAINT_TOOL_SMEAR, PAINT_TOOL_SOFTEN) || (brush->imagepaint_tool == PAINT_TOOL_FILL) || (brush->flag & BRUSH_USE_GRADIENT) || (brush->mtex.tex && !ELEM(brush->mtex.brush_map_mode, diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index 03925b5ebc3..a11cbfa52af 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); @@ -3807,7 +3807,7 @@ static void vpaint_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 707de6755b3..2f448dc056b 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc @@ -49,7 +49,7 @@ static bool vertex_weight_paint_mode_poll(bContext *C) { Object *ob = CTX_data_active_object(C); Mesh *me = BKE_mesh_from_object(ob); - return (ob && (ELEM(ob->mode, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT))) && + return (ob && ELEM(ob->mode, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT)) && (me && me->totpoly && !me->deform_verts().is_empty()); } diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index a4c054155dd..0b11aa37981 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -938,7 +938,7 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe uiItemR( row, &tex_ptr, "noise_basis_2", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, nullptr, ICON_NONE); row = uiLayoutRow(col, false); - uiLayoutSetActive(row, !(ELEM(tex->stype, TEX_BAND, TEX_RING))); + uiLayoutSetActive(row, !ELEM(tex->stype, TEX_BAND, TEX_RING)); uiItemR(row, &tex_ptr, "noise_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, nullptr, ICON_NONE); break; diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc index b02f22f378f..b9983b6f269 100644 --- a/source/blender/editors/space_node/space_node.cc +++ b/source/blender/editors/space_node/space_node.cc @@ -658,7 +658,7 @@ static bool node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent { if (drag->type == WM_DRAG_PATH) { /* rule might not work? */ - return (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE)); + return ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE); } return WM_drag_is_ID_type(drag, ID_IM); } diff --git a/source/blender/editors/space_outliner/outliner_context.cc b/source/blender/editors/space_outliner/outliner_context.cc index 001bda57fa2..87eb2d3e73f 100644 --- a/source/blender/editors/space_outliner/outliner_context.cc +++ b/source/blender/editors/space_outliner/outliner_context.cc @@ -21,7 +21,7 @@ static void outliner_context_selected_ids_recursive(const SpaceOutliner &space_o { tree_iterator::all(space_outliner, [&](const TreeElement *te) { const TreeStoreElem *tse = TREESTORE(te); - if ((tse->flag & TSE_SELECTED) && (ELEM(tse->type, TSE_SOME_ID, TSE_LAYER_COLLECTION))) { + if ((tse->flag & TSE_SELECTED) && ELEM(tse->type, TSE_SOME_ID, TSE_LAYER_COLLECTION)) { CTX_data_id_list_add(result, tse->id); } }); diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc index 1bbe6ccc529..995ee6abe61 100644 --- a/source/blender/editors/space_view3d/space_view3d.cc +++ b/source/blender/editors/space_view3d/space_view3d.cc @@ -632,7 +632,7 @@ static bool view3d_ima_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event } if (drag->type == WM_DRAG_PATH) { /* rule might not work? */ - return (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE)); + return ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE); } return WM_drag_is_ID_type(drag, ID_IM); diff --git a/source/blender/editors/util/ed_util_ops.cc b/source/blender/editors/util/ed_util_ops.cc index af3589e50f0..d25179a1b70 100644 --- a/source/blender/editors/util/ed_util_ops.cc +++ b/source/blender/editors/util/ed_util_ops.cc @@ -229,7 +229,7 @@ static int lib_id_fake_user_toggle_exec(bContext *C, wmOperator *op) ID *id = (ID *)idptr.data; if (!BKE_id_is_editable(CTX_data_main(C), id) || - (ELEM(GS(id->name), ID_GR, ID_SCE, ID_SCR, ID_TXT, ID_OB, ID_WS))) { + ELEM(GS(id->name), ID_GR, ID_SCE, ID_SCR, ID_TXT, ID_OB, ID_WS)) { BKE_report(op->reports, RPT_ERROR, "Data-block type does not support fake user"); return OPERATOR_CANCELLED; } diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index 7aacf61c604..66a31d02a9b 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -593,14 +593,14 @@ int Stroke::Resample(int iNPoints) for (vector<StrokeSegment>::iterator s = strokeSegments.begin(), send = strokeSegments.end(); s != send; ++s) { - newVertices.push_back(&(*(s->_begin))); + newVertices.push_back(&*(s->_begin)); if (s->_sampling < _sampling) { _sampling = s->_sampling; } t = s->_sampling / s->_length; for (int i = 0; i < s->_n; ++i) { - newVertex = new StrokeVertex(&(*(s->_begin)), &(*(s->_end)), t); + newVertex = new StrokeVertex(&*(s->_begin), &*(s->_end), t); newVertices.push_back(newVertex); t += s->_sampling / s->_length; } diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index 343f6a8f761..d73d457713c 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -1289,7 +1289,7 @@ void ViewMapBuilder::computeCusps(ViewMap *ioViewMap) if (_pRenderMonitor && _pRenderMonitor->testBreak()) { break; } - if ((!((*ve)->getNature() & Nature::SILHOUETTE)) || (!((*ve)->fedgeA()->isSmooth()))) { + if (!((*ve)->getNature() & Nature::SILHOUETTE) || !((*ve)->fedgeA()->isSmooth())) { continue; } FEdge *fe = (*ve)->fedgeA(); @@ -2313,8 +2313,8 @@ struct silhouette_binary_rule : public binary_rule<segment, segment> { FEdge *f1 = s1.edge(); FEdge *f2 = s2.edge(); - if ((!(((f1)->getNature() & Nature::SILHOUETTE) || ((f1)->getNature() & Nature::BORDER))) && - (!(((f2)->getNature() & Nature::SILHOUETTE) || ((f2)->getNature() & Nature::BORDER)))) { + if (!(((f1)->getNature() & Nature::SILHOUETTE) || ((f1)->getNature() & Nature::BORDER)) && + !(((f2)->getNature() & Nature::SILHOUETTE) || ((f2)->getNature() & Nature::BORDER))) { return false; } diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc index 5f600ee55d8..be53ee5d945 100644 --- a/source/blender/gpu/intern/gpu_shader_dependency.cc +++ b/source/blender/gpu/intern/gpu_shader_dependency.cc @@ -109,7 +109,7 @@ struct GPUSource { } if ((source.find("drw_debug_") != StringRef::not_found) && /* Avoid these two files where it makes no sense to add the dependency. */ - (!ELEM(filename, "common_debug_draw_lib.glsl", "draw_debug_draw_display_vert.glsl"))) { + !ELEM(filename, "common_debug_draw_lib.glsl", "draw_debug_draw_display_vert.glsl")) { builtins |= shader::BuiltinBits::USE_DEBUG_DRAW; } check_no_quotes(); @@ -140,7 +140,7 @@ struct GPUSource { if constexpr (check_whole_word) { /* Fix false positive if something has "enum" as suffix. */ char previous_char = input[offset - 1]; - if (!(ELEM(previous_char, '\n', '\t', ' ', ':', '(', ','))) { + if (!ELEM(previous_char, '\n', '\t', ' ', ':', '(', ',')) { offset += (reversed) ? -1 : 1; continue; } diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc index ea433bec139..77c79852141 100644 --- a/source/blender/io/usd/intern/usd_reader_mesh.cc +++ b/source/blender/io/usd/intern/usd_reader_mesh.cc @@ -422,9 +422,9 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo const UVSample &sample = uv_primvars[layer_idx]; - if (!(ELEM(sample.interpolation, - pxr::UsdGeomTokens->faceVarying, - pxr::UsdGeomTokens->vertex))) { + if (!ELEM(sample.interpolation, + pxr::UsdGeomTokens->faceVarying, + pxr::UsdGeomTokens->vertex)) { std::cerr << "WARNING: unexpected interpolation type " << sample.interpolation << " for uv " << layer->name << std::endl; continue; @@ -865,7 +865,7 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh, pxr::TfToken interp = p.GetInterpolation(); - if (!(ELEM(interp, pxr::UsdGeomTokens->faceVarying, pxr::UsdGeomTokens->vertex))) { + if (!ELEM(interp, pxr::UsdGeomTokens->faceVarying, pxr::UsdGeomTokens->vertex)) { continue; } diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc index 6209985ecff..6adf36cc184 100644 --- a/source/blender/modifiers/intern/MOD_mask.cc +++ b/source/blender/modifiers/intern/MOD_mask.cc @@ -650,7 +650,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx) } /* Quick test to see if we can return early. */ - if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) || (mesh->totvert == 0) || + if (!ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP) || (mesh->totvert == 0) || BLI_listbase_is_empty(&mesh->vertex_group_names)) { return mesh; } diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index 4d1eff0b940..18be416b735 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -685,7 +685,7 @@ const char *node_cmp_rlayers_sock_to_pass(int sock_index) } const char *name = cmp_node_rlayers_out[sock_index].name; /* Exception for alpha, which is derived from Combined. */ - return (STREQ(name, "Alpha")) ? RE_PASSNAME_COMBINED : name; + return STREQ(name, "Alpha") ? RE_PASSNAME_COMBINED : name; } namespace blender::nodes::node_composite_render_layer_cc { diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc index ba8c9a893c2..abf9135bce8 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc @@ -151,7 +151,7 @@ static bool colinear_f3_f3_f3(const float3 p1, const float3 p2, const float3 p3) { const float3 a = math::normalize(p2 - p1); const float3 b = math::normalize(p3 - p1); - return (ELEM(a, b, b * -1.0f)); + return ELEM(a, b, b * -1.0f); } static Curves *create_arc_curve_from_points(const int resolution, diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc index 56a9601ce7e..4c5a8faa4b2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc @@ -98,7 +98,7 @@ static bool colinear_f3_f3_f3(const float3 p1, const float3 p2, const float3 p3) { const float3 a = math::normalize(p2 - p1); const float3 b = math::normalize(p3 - p1); - return (ELEM(a, b, b * -1.0f)); + return ELEM(a, b, b * -1.0f); } static Curves *create_point_circle_curve( diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc index fc6a5ef72b6..09cda405d72 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.cc @@ -173,7 +173,7 @@ static void node_shader_update_tex_voronoi(bNodeTree *ntree, bNode *node) outWSock, storage.feature != SHD_VORONOI_DISTANCE_TO_EDGE && storage.feature != SHD_VORONOI_N_SPHERE_RADIUS && - (ELEM(storage.dimensions, 1, 4))); + ELEM(storage.dimensions, 1, 4)); nodeSetSocketAvailability(ntree, outRadiusSock, storage.feature == SHD_VORONOI_N_SPHERE_RADIUS); } diff --git a/source/blender/windowmanager/intern/wm_dragdrop.cc b/source/blender/windowmanager/intern/wm_dragdrop.cc index 92f7a5b7c42..f7d484e9b7a 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.cc +++ b/source/blender/windowmanager/intern/wm_dragdrop.cc @@ -585,7 +585,7 @@ wmDragAsset *WM_drag_get_asset_data(const wmDrag *drag, int idcode) } wmDragAsset *asset_drag = static_cast<wmDragAsset *>(drag->poin); - return (ELEM(idcode, 0, asset_drag->id_type)) ? asset_drag : nullptr; + return ELEM(idcode, 0, asset_drag->id_type) ? asset_drag : nullptr; } AssetMetaData *WM_drag_get_asset_meta_data(const wmDrag *drag, int idcode) diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index 201fc177b9c..d88a5a5a18b 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -567,7 +567,7 @@ void wm_event_do_notifiers(bContext *C) } if (note->window == win || - (note->window == nullptr && (ELEM(note->reference, nullptr, scene)))) { + (note->window == nullptr && ELEM(note->reference, nullptr, scene))) { if (note->category == NC_SCENE) { if (note->data == ND_FRAME) { do_anim = true; |