From 40c345a42af3474271b8b39934a8dd808d42e65c Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 21 Mar 2012 10:42:32 -0400 Subject: [PATCH] table-layout: Remove dead code If a column/row is expanding, n_expand has to be greater than 1. https://bugzilla.gnome.org/show_bug.cgi?id=672557 --- clutter/clutter-table-layout.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/clutter/clutter-table-layout.c b/clutter/clutter-table-layout.c index 76289a7..ab7b5b2 100644 --- a/clutter/clutter-table-layout.c +++ b/clutter/clutter-table-layout.c @@ -1001,12 +1001,8 @@ calculate_col_widths (ClutterTableLayout *self, { if (columns[i].expand) { - if (n_expand) - columns[i].final_size = columns[i].pref_size - + (extra_width / n_expand); - else - columns[i].final_size = columns[i].pref_size - + (extra_width / priv->n_cols); + columns[i].final_size = columns[i].pref_size + + (extra_width / n_expand); } else columns[i].final_size = columns[i].pref_size; @@ -1289,12 +1285,8 @@ calculate_row_heights (ClutterTableLayout *self, { if (rows[i].expand) { - if (n_expand) - rows[i].final_size = rows[i].pref_size - + (extra_height / n_expand); - else - rows[i].final_size = rows[i].pref_size - + (extra_height / priv->n_rows); + rows[i].final_size = rows[i].pref_size + + (extra_height / n_expand); } else rows[i].final_size = rows[i].pref_size; -- 2.7.4