From 9133ec5cd49207c36f0a4f3f92776a3d3d81d855 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 10 Jan 2017 19:53:08 -0500 Subject: [PATCH] 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. --- gtk/gtkcssstaticstyle.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gtk/gtkcssstaticstyle.c b/gtk/gtkcssstaticstyle.c index 1d4940258f..217bb06265 100644 --- a/gtk/gtkcssstaticstyle.c +++ b/gtk/gtkcssstaticstyle.c @@ -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]; }