gegl r2968 - in trunk: . gegl/graph
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2968 - in trunk: . gegl/graph
- Date: Wed, 18 Mar 2009 19:36:47 +0000 (UTC)
Author: martinn
Date: Wed Mar 18 19:36:47 2009
New Revision: 2968
URL: http://svn.gnome.org/viewvc/gegl?rev=2968&view=rev
Log:
Remove GeglVisitableClass::needs_visiting()
Apply patch from Henrik Akesson that removes the superfluous
GeglVisitableClass::needs_visiting() and all code that depends on it
such as the GeglNode and GeglPad implementations (both of which just
returned TRUE) and the calls to the method.
Modified:
trunk/ChangeLog
trunk/gegl/graph/gegl-node.c
trunk/gegl/graph/gegl-pad.c
trunk/gegl/graph/gegl-visitable.c
trunk/gegl/graph/gegl-visitable.h
trunk/gegl/graph/gegl-visitor.c
Modified: trunk/gegl/graph/gegl-node.c
==============================================================================
--- trunk/gegl/graph/gegl-node.c (original)
+++ trunk/gegl/graph/gegl-node.c Wed Mar 18 19:36:47 2009
@@ -101,7 +101,6 @@
static void gegl_node_visitable_accept (GeglVisitable *visitable,
GeglVisitor *visitor);
static GSList* gegl_node_visitable_depends_on (GeglVisitable *visitable);
-static gboolean gegl_node_visitable_needs_visiting (GeglVisitable *visitable);
static void gegl_node_set_operation_object (GeglNode *self,
GeglOperation *operation);
static void gegl_node_set_op_class (GeglNode *self,
@@ -221,7 +220,6 @@
visitable_class->accept = gegl_node_visitable_accept;
visitable_class->depends_on = gegl_node_visitable_depends_on;
- visitable_class->needs_visiting = gegl_node_visitable_needs_visiting;
}
static void
@@ -950,12 +948,6 @@
return gegl_node_get_depends_on (self);
}
-static gboolean
-gegl_node_visitable_needs_visiting (GeglVisitable *visitable)
-{
- return TRUE;
-}
-
static void
gegl_node_set_op_class (GeglNode *node,
const gchar *op_class,
Modified: trunk/gegl/graph/gegl-pad.c
==============================================================================
--- trunk/gegl/graph/gegl-pad.c (original)
+++ trunk/gegl/graph/gegl-pad.c Wed Mar 18 19:36:47 2009
@@ -40,7 +40,6 @@
static void visitable_accept (GeglVisitable *visitable,
GeglVisitor *visitor);
static GSList * visitable_depends_on (GeglVisitable *visitable);
-static gboolean visitable_needs_visiting (GeglVisitable *visitable);
G_DEFINE_TYPE_WITH_CODE (GeglPad, gegl_pad, G_TYPE_OBJECT,
@@ -73,7 +72,6 @@
visitable_class->accept = visitable_accept;
visitable_class->depends_on = visitable_depends_on;
- visitable_class->needs_visiting = visitable_needs_visiting;
}
static void
@@ -315,12 +313,6 @@
return gegl_pad_get_depends_on (self);
}
-static gboolean
-visitable_needs_visiting (GeglVisitable *visitable)
-{
- return TRUE;
-}
-
void
gegl_pad_set_format (GeglPad *self,
const Babl *format)
Modified: trunk/gegl/graph/gegl-visitable.c
==============================================================================
--- trunk/gegl/graph/gegl-visitable.c (original)
+++ trunk/gegl/graph/gegl-visitable.c Wed Mar 18 19:36:47 2009
@@ -88,20 +88,3 @@
return depends_on;
}
-
-gboolean
-gegl_visitable_needs_visiting (GeglVisitable *interface)
-{
- GeglVisitableClass *interface_class;
- gboolean needs_visiting;
-
- g_return_val_if_fail (GEGL_IS_VISITABLE (interface), FALSE);
-
- interface_class = GEGL_VISITABLE_GET_CLASS (interface);
-
- g_object_ref (interface);
- needs_visiting = interface_class->needs_visiting (interface);
- g_object_unref (interface);
-
- return needs_visiting;
-}
Modified: trunk/gegl/graph/gegl-visitable.h
==============================================================================
--- trunk/gegl/graph/gegl-visitable.h (original)
+++ trunk/gegl/graph/gegl-visitable.h Wed Mar 18 19:36:47 2009
@@ -37,7 +37,6 @@
void (* accept) (GeglVisitable *interface,
GeglVisitor *visitor);
GSList * (* depends_on) (GeglVisitable *interface);
- gboolean (* needs_visiting) (GeglVisitable *interface);
};
@@ -46,7 +45,6 @@
void gegl_visitable_accept (GeglVisitable *interface,
GeglVisitor *visitor);
GSList * gegl_visitable_depends_on (GeglVisitable *interface);
-gboolean gegl_visitable_needs_visiting (GeglVisitable *interface);
Modified: trunk/gegl/graph/gegl-visitor.c
==============================================================================
--- trunk/gegl/graph/gegl-visitor.c (original)
+++ trunk/gegl/graph/gegl-visitor.c Wed Mar 18 19:36:47 2009
@@ -311,11 +311,8 @@
g_return_if_fail (GEGL_IS_VISITOR (self));
g_return_if_fail (GEGL_IS_VISITABLE (visitable));
- if (gegl_visitable_needs_visiting (visitable))
- {
- init_dfs_traversal (self, visitable);
- dfs_traverse (self, visitable);
- }
+ init_dfs_traversal (self, visitable);
+ dfs_traverse (self, visitable);
}
static void
@@ -331,15 +328,11 @@
while (llink)
{
- GeglVisitable *visitable = llink->data;
-
- if (gegl_visitable_needs_visiting (visitable))
- {
- GeglVisitInfo *visit_info = lookup (self, visitable);
+ GeglVisitable *visitable = llink->data;
+ GeglVisitInfo *visit_info = lookup (self, visitable);
- if (!visit_info)
- init_dfs_traversal (self, visitable);
- }
+ if (!visit_info)
+ init_dfs_traversal (self, visitable);
llink = g_slist_next (llink);
}
@@ -361,11 +354,8 @@
{
GeglVisitable *visitable = llink->data;
- if (gegl_visitable_needs_visiting (visitable))
- {
- if (!get_visited (self, visitable))
- dfs_traverse (self, visitable);
- }
+ if (!get_visited (self, visitable))
+ dfs_traverse (self, visitable);
llink = g_slist_next (llink);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]