[gtk+/wip/alexl/rendertree] Remove an unnecessary check
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/alexl/rendertree] Remove an unnecessary check
- Date: Wed, 11 Jan 2017 00:54:26 +0000 (UTC)
commit d57f5de506fab75cb23937bafce3b6a53c42f166
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 10 19:53:08 2017 -0500
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 files changed, 0 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcssstaticstyle.c b/gtk/gtkcssstaticstyle.c
index 1d49402..217bb06 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];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]