summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-04-25 15:45:37 +0200
committerTimm Bäder <mail@baedert.org>2017-04-25 17:29:41 +0200
commitb39844c70fcc5a9db03f066a58a94bb3e1382d8c (patch)
treeb17c2bc0b4e2d5fab2994180d3e3875f32c8fe15
parent7cf85519e7185349e02c4cb3200fc291fa56d036 (diff)
downloadgtk+-b39844c70fcc5a9db03f066a58a94bb3e1382d8c.tar.gz
label: Move if statement where it makes sense
In the else branch of the if statement before this one, we're assigning *smallest = *widest anyway, so this if statement is never true. Move it to the if block before instead, where it can apply.
-rw-r--r--gtk/gtklabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index b3111dd50b..f4c39e44c5 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3703,15 +3703,15 @@ gtk_label_get_preferred_layout_size (GtkLabel *label,
widest->width = MAX (widest->width, char_pixels * priv->width_chars);
widest->x = widest->y = 0;
}
+
+ if (widest->width < smallest->width)
+ *smallest = *widest;
}
else
{
*smallest = *widest;
}
- if (widest->width < smallest->width)
- *smallest = *widest;
-
g_object_unref (layout);
}