From cb0cab48efda03eb4f7f4a3c097be09212fa4fa0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 10 Jun 2021 01:55:46 +1000 Subject: Cleanup: redundant/unused assignments --- source/blender/blenkernel/intern/curve.c | 5 +---- source/blender/blenkernel/intern/customdata.c | 4 +--- source/blender/editors/animation/anim_channels_defines.c | 1 - source/blender/editors/interface/interface_layout.c | 3 +-- source/blender/editors/space_node/node_gizmo.c | 1 - 5 files changed, 3 insertions(+), 11 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index f7eca689241..65cdb8503a4 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -3192,7 +3192,6 @@ static void calchandleNurb_intern(BezTriple *bezt, float pt[3]; float dvec_a[3], dvec_b[3]; float len, len_a, len_b; - float len_ratio; const float eps = 1e-5; /* assume normal handle until we check */ @@ -3244,8 +3243,6 @@ static void calchandleNurb_intern(BezTriple *bezt, len_b = 1.0f; } - len_ratio = len_a / len_b; - if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) || ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM)) { /* auto */ float tvec[3]; tvec[0] = dvec_b[0] / len_b + dvec_a[0] / len_a; @@ -3378,7 +3375,7 @@ static void calchandleNurb_intern(BezTriple *bezt, len_b = 1.0f; } - len_ratio = len_a / len_b; + const float len_ratio = len_a / len_b; if (bezt->f1 & handle_sel_flag) { /* order of calculation */ if (ELEM(bezt->h2, HD_ALIGN, HD_ALIGN_DOUBLESIDE)) { /* aligned */ diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index d8d9675b42b..710dfdaf137 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1226,8 +1226,6 @@ static void layerInterp_mvert_skin(const void **sources, int count, void *dest) { - MVertSkin *vs_dst = dest; - float radius[3]; zero_v3(radius); @@ -1239,7 +1237,7 @@ static void layerInterp_mvert_skin(const void **sources, } /* Delay writing to the destination in case dest is in sources. */ - vs_dst = dest; + MVertSkin *vs_dst = dest; copy_v3_v3(vs_dst->radius, radius); vs_dst->flag &= ~MVERT_SKIN_ROOT; } diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index d4941950029..0b587191807 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -5462,7 +5462,6 @@ void ANIM_channel_draw_widgets(const bContext *C, prop = RNA_struct_find_property(&ptr, "use_mask_layer"); gp_rna_path = RNA_path_from_ID_to_property(&ptr, prop); if (RNA_path_resolve_property(&id_ptr, gp_rna_path, &ptr, &prop)) { - icon = ICON_LAYER_ACTIVE; if (gpl->flag & GP_LAYER_USE_MASK) { icon = ICON_MOD_MASK; } diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 8f2871ce18b..c04432a2912 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -4042,12 +4042,11 @@ static void ui_litem_layout_column_flow(uiLayout *litem) int emy = 0; int miny = 0; - int w = litem->w - (flow->totcol - 1) * style->columnspace; emh = toth / flow->totcol; /* create column per column */ col = 0; - w = (litem->w - (flow->totcol - 1) * style->columnspace) / flow->totcol; + int w = (litem->w - (flow->totcol - 1) * style->columnspace) / flow->totcol; LISTBASE_FOREACH (uiItem *, item, &litem->items) { ui_item_size(item, &itemw, &itemh); diff --git a/source/blender/editors/space_node/node_gizmo.c b/source/blender/editors/space_node/node_gizmo.c index 28d7e1b8d04..8547c825230 100644 --- a/source/blender/editors/space_node/node_gizmo.c +++ b/source/blender/editors/space_node/node_gizmo.c @@ -97,7 +97,6 @@ static void gizmo_node_backdrop_prop_matrix_set(const wmGizmo *UNUSED(gz), BLI_assert(gz_prop->type->array_length == 16); SpaceNode *snode = gz_prop->custom_func.user_data; snode->zoom = matrix[0][0]; - snode->zoom = matrix[1][1]; snode->xof = matrix[3][0]; snode->yof = matrix[3][1]; } -- cgit v1.2.3