mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Remove an unnecessary check
Since the demise of theme engines, we can no longer hit the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't check for this in a very frequently called function.
This commit is contained in:
parent
c1dc36dff0
commit
9133ec5cd4
@ -46,13 +46,6 @@ gtk_css_static_style_get_value (GtkCssStyle *style,
|
||||
{
|
||||
GtkCssStaticStyle *sstyle = GTK_CSS_STATIC_STYLE (style);
|
||||
|
||||
if (G_UNLIKELY (id >= GTK_CSS_PROPERTY_N_PROPERTIES))
|
||||
{
|
||||
GtkCssStyleProperty *prop = _gtk_css_style_property_lookup_by_id (id);
|
||||
|
||||
return _gtk_css_style_property_get_initial_value (prop);
|
||||
}
|
||||
|
||||
return sstyle->values[id];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user