[Lemon-commits] [lemon_svn] deba: r2229 - hugo/trunk/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:51:06 CET 2006


Author: deba
Date: Mon Oct  3 16:22:10 2005
New Revision: 2229

Modified:
   hugo/trunk/lemon/list_graph.h

Log:
Bugfix in list_graph



Modified: hugo/trunk/lemon/list_graph.h
==============================================================================
--- hugo/trunk/lemon/list_graph.h	(original)
+++ hugo/trunk/lemon/list_graph.h	Mon Oct  3 16:22:10 2005
@@ -282,6 +282,9 @@
       if(edges[e.id].prev_in != -1)
 	edges[edges[e.id].prev_in].next_in = edges[e.id].next_in;
       else nodes[edges[e.id].target].first_in = edges[e.id].next_in;
+      if (nodes[n.id].first_in != -1) {
+	edges[nodes[n.id].first_in].prev_in = e.id;
+      }
       edges[e.id].target = n.id;
       edges[e.id].prev_in = -1;
       edges[e.id].next_in = nodes[n.id].first_in;
@@ -294,6 +297,9 @@
       if(edges[e.id].prev_out != -1)
 	edges[edges[e.id].prev_out].next_out = edges[e.id].next_out;
       else nodes[edges[e.id].source].first_out = edges[e.id].next_out;
+      if (nodes[n.id].first_out != -1) {
+	edges[nodes[n.id].first_out].prev_out = e.id;
+      }
       edges[e.id].source = n.id;
       edges[e.id].prev_out = -1;
       edges[e.id].next_out = nodes[n.id].first_out;



More information about the Lemon-commits mailing list