Cleanup: redundant/unused assignments

This commit is contained in:
Campbell Barton 2021-06-10 01:55:46 +10:00
parent 029fb002dd
commit cb0cab48ef
5 changed files with 3 additions and 11 deletions

View File

@ -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 */

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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];
}