[gtk+] css matcher: Avoid a redundant call



commit a831f1fb112e342055428fc6ab8f825bb686a4b8
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Sep 10 20:42:07 2015 -0400

    css matcher: Avoid a redundant call
    
    The sole caller passes an interned string, so we don't
    need to call g_intern_string again.

 gtk/gtkcssmatcher.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssmatcher.c b/gtk/gtkcssmatcher.c
index 59d6135..d371bd8 100644
--- a/gtk/gtkcssmatcher.c
+++ b/gtk/gtkcssmatcher.c
@@ -313,7 +313,8 @@ static gboolean
 gtk_css_matcher_node_has_id (const GtkCssMatcher *matcher,
                              const char          *id)
 {
-  return gtk_css_node_get_id (matcher->node.node) == g_intern_string (id);
+  /* assume all callers pass an interned string */
+  return gtk_css_node_get_id (matcher->node.node) == id;
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]