]> granicus.if.org Git - graphviz/commitdiff
Make sure edges are stored in node creation order
authorEmden Gansner <erg@research.att.com>
Tue, 11 Oct 2011 16:38:58 +0000 (12:38 -0400)
committerEmden Gansner <erg@research.att.com>
Tue, 11 Oct 2011 16:38:58 +0000 (12:38 -0400)
lib/cgraph/edge.c

index 0255bb86641ab77d3dd4a3bc78ad7c03d9c3786f..3828dd4f326980e1bde845405cd47f17011652c7 100644 (file)
@@ -427,13 +427,7 @@ int agedgeseqcmpf(Dict_t * d, void *arg_e0, void *arg_e1, Dtdisc_t * disc)
     e0 = arg_e0;
     e1 = arg_e1;
     NOTUSED(disc);
-    v = AGID(e0->node) - AGID(e1->node);
-    if (v == 0) {              /* same node */
-       if ((AGTYPE(e0) == 0) || (AGTYPE(e1) == 0))
-           v = 0;
-       else
-           v = AGSEQ(e0) - AGSEQ(e1);
-    }
+    v = (AGSEQ(e0) - AGSEQ(e1));
     return ((v==0)?0:(v<0?-1:1));
 }