widget: Simplify set_style_context

No need to use widget->priv later if we already define a priv pointer
before.
This commit is contained in:
Timm Bäder 2018-02-26 08:42:38 +01:00
parent c7294ab90e
commit a9cd2d8181

View File

@ -12727,12 +12727,10 @@ _gtk_widget_peek_style_context (GtkWidget *widget)
GtkStyleContext *
gtk_widget_get_style_context (GtkWidget *widget)
{
GtkWidgetPrivate *priv;
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
priv = widget->priv;
if (G_UNLIKELY (priv->context == NULL))
{
GdkDisplay *display;
@ -12757,7 +12755,7 @@ gtk_widget_get_style_context (GtkWidget *widget)
_gtk_widget_get_style_context (priv->parent));
}
return widget->priv->context;
return priv->context;
}
/**