[gtk+/wip/cssnode3: 40/46] cssnode: Remove now unused arg from vfunc



commit 64fada6424dc9aa4fe0f3260fd91769794c9d1b0
Author: Benjamin Otte <otte redhat com>
Date:   Mon Feb 9 17:26:07 2015 +0100

    cssnode: Remove now unused arg from vfunc

 gtk/gtkcssmatcher.c     |    4 ++--
 gtk/gtkcssnode.c        |   23 +++++------------------
 gtk/gtkcssnodeprivate.h |    6 ++----
 gtk/gtkcsspathnode.c    |    3 +--
 gtk/gtkcsswidgetnode.c  |    3 +--
 5 files changed, 11 insertions(+), 28 deletions(-)
---
diff --git a/gtk/gtkcssmatcher.c b/gtk/gtkcssmatcher.c
index 374b567..956271a 100644
--- a/gtk/gtkcssmatcher.c
+++ b/gtk/gtkcssmatcher.c
@@ -253,7 +253,7 @@ gtk_css_matcher_node_get_parent (GtkCssMatcher       *matcher,
   if (node == NULL)
     return FALSE;
 
-  return gtk_css_node_init_matcher (node, matcher, NULL);
+  return gtk_css_node_init_matcher (node, matcher);
 }
 
 static gboolean
@@ -266,7 +266,7 @@ gtk_css_matcher_node_get_previous (GtkCssMatcher       *matcher,
   if (node == NULL)
     return FALSE;
 
-  return gtk_css_node_init_matcher (node, matcher, NULL);
+  return gtk_css_node_init_matcher (node, matcher);
 }
 
 static GtkStateFlags
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 786da5b..8a9027c 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -111,8 +111,7 @@ gtk_css_node_real_validate (GtkCssNode       *cssnode,
 
 gboolean
 gtk_css_node_real_init_matcher (GtkCssNode     *cssnode,
-                                GtkCssMatcher  *matcher,
-                                GtkWidgetPath **path_out)
+                                GtkCssMatcher  *matcher)
 {
   _gtk_css_matcher_node_init (matcher, cssnode);
 
@@ -562,7 +561,6 @@ gtk_css_node_update_style (GtkCssNode       *cssnode,
 {
   const GtkCssNodeDeclaration *decl;
   GtkCssMatcher matcher;
-  GtkWidgetPath *path;
   GtkCssStyle *parent;
   GtkCssStyle *result;
 
@@ -573,7 +571,7 @@ gtk_css_node_update_style (GtkCssNode       *cssnode,
   if (result)
     return g_object_ref (result);
 
-  if (!gtk_css_node_init_matcher (cssnode, &matcher, &path))
+  if (!gtk_css_node_init_matcher (cssnode, &matcher))
     {
       g_assert_not_reached ();
     }
@@ -584,9 +582,6 @@ gtk_css_node_update_style (GtkCssNode       *cssnode,
                                             &matcher,
                                             parent);
 
-  if (path)
-    gtk_widget_path_free (path);
-
   store_in_global_parent_cache (cssnode, parent, decl, style);
 
   return result;
@@ -597,7 +592,6 @@ gtk_css_node_create_style (GtkCssNode *cssnode)
 {
   const GtkCssNodeDeclaration *decl;
   GtkCssMatcher matcher;
-  GtkWidgetPath *path;
   GtkCssStyle *parent;
   GtkCssStyle *style;
 
@@ -608,7 +602,7 @@ gtk_css_node_create_style (GtkCssNode *cssnode)
   if (style)
     return g_object_ref (style);
 
-  if (gtk_css_node_init_matcher (cssnode, &matcher, &path))
+  if (gtk_css_node_init_matcher (cssnode, &matcher))
     style = gtk_css_static_style_new_compute (gtk_css_node_get_style_provider (cssnode),
                                               &matcher,
                                               parent);
@@ -617,9 +611,6 @@ gtk_css_node_create_style (GtkCssNode *cssnode)
                                               NULL,
                                               parent);
 
-  if (path)
-    gtk_widget_path_free (path);
-
   store_in_global_parent_cache (cssnode, parent, decl, style);
 
   return style;
@@ -703,13 +694,9 @@ gtk_css_node_validate (GtkCssNode            *cssnode,
 
 gboolean
 gtk_css_node_init_matcher (GtkCssNode     *cssnode,
-                           GtkCssMatcher  *matcher,
-                           GtkWidgetPath **path_out)
+                           GtkCssMatcher  *matcher)
 {
-  if (path_out)
-    *path_out = NULL;
-
-  return GTK_CSS_NODE_GET_CLASS (cssnode)->init_matcher (cssnode, matcher, path_out);
+  return GTK_CSS_NODE_GET_CLASS (cssnode)->init_matcher (cssnode, matcher);
 }
 
 GtkWidgetPath *
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index b119730..4207d2f 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -58,8 +58,7 @@ struct _GtkCssNodeClass
   GObjectClass object_class;
 
   gboolean              (* init_matcher)                (GtkCssNode            *cssnode,
-                                                         GtkCssMatcher         *matcher,
-                                                         GtkWidgetPath        **path);
+                                                         GtkCssMatcher         *matcher);
   GtkWidgetPath *       (* create_widget_path)          (GtkCssNode            *cssnode);
   const GtkWidgetPath * (* get_widget_path)             (GtkCssNode            *cssnode);
   GtkStyleProviderPrivate *(* get_style_provider)       (GtkCssNode            *cssnode);
@@ -135,8 +134,7 @@ void                    gtk_css_node_set_invalid        (GtkCssNode            *
                                                          gboolean               invalid);
 
 gboolean                gtk_css_node_init_matcher       (GtkCssNode            *cssnode,
-                                                         GtkCssMatcher         *matcher,
-                                                         GtkWidgetPath        **path);
+                                                         GtkCssMatcher         *matcher);
 GtkWidgetPath *         gtk_css_node_create_widget_path (GtkCssNode            *cssnode);
 const GtkWidgetPath *   gtk_css_node_get_widget_path    (GtkCssNode            *cssnode);
 GtkStyleProviderPrivate *gtk_css_node_get_style_provider(GtkCssNode            *cssnode);
diff --git a/gtk/gtkcsspathnode.c b/gtk/gtkcsspathnode.c
index 659a1c7..920c8e2 100644
--- a/gtk/gtkcsspathnode.c
+++ b/gtk/gtkcsspathnode.c
@@ -38,8 +38,7 @@ gtk_css_path_node_invalidate (GtkCssNode *node)
 
 gboolean
 gtk_css_path_node_real_init_matcher (GtkCssNode     *node,
-                                     GtkCssMatcher  *matcher,
-                                     GtkWidgetPath **path_out)
+                                     GtkCssMatcher  *matcher)
 {
   GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
 
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c
index b279081..3a05b1d 100644
--- a/gtk/gtkcsswidgetnode.c
+++ b/gtk/gtkcsswidgetnode.c
@@ -170,8 +170,7 @@ gtk_css_widget_node_validate (GtkCssNode       *node,
 
 gboolean
 gtk_css_widget_node_init_matcher (GtkCssNode     *node,
-                                  GtkCssMatcher  *matcher,
-                                  GtkWidgetPath **path_out)
+                                  GtkCssMatcher  *matcher)
 {
   GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
 


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