remove some redundant vars, assignments & checks.

This commit is contained in:
2011-03-19 05:06:06 +00:00
parent 3b8d4aa25f
commit e9005b985e
13 changed files with 16 additions and 25 deletions

View File

@@ -1971,17 +1971,15 @@ static void ui_litem_layout_split(uiLayout *litem)
uiLayoutItemSplt *split= (uiLayoutItemSplt*)litem;
uiItem *item;
float percentage;
int itemh, x, y, w, tot=0, colw=0;
const int tot= BLI_countlist(&litem->items);
int itemh, x, y, w, colw=0;
if(tot == 0)
return;
x= litem->x;
y= litem->y;
for(item=litem->items.first; item; item=item->next)
tot++;
if(tot == 0)
return;
percentage= (split->percentage == 0.0f)? 1.0f/(float)tot: split->percentage;
w= (litem->w - (tot-1)*litem->space);