forked from AuroraMiddleware/gtk
widget: Avoid an unnecessary check
The preceding loop terminates when either the widget is NULL, or if their type matches. There is no reason to check that again
This commit is contained in:
parent
47872e5172
commit
33bacb4150
@ -8114,9 +8114,6 @@ gtk_widget_get_ancestor (GtkWidget *widget,
|
||||
while (widget && !g_type_is_a (G_OBJECT_TYPE (widget), widget_type))
|
||||
widget = widget->priv->parent;
|
||||
|
||||
if (!(widget && g_type_is_a (G_OBJECT_TYPE (widget), widget_type)))
|
||||
return NULL;
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user