From: Emden Gansner Date: Tue, 11 Oct 2011 16:38:58 +0000 (-0400) Subject: Make sure edges are stored in node creation order X-Git-Tag: LAST_LIBGRAPH~32^2~640 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0853b1a374fe52d7c494b066a8d097c5c6b9da2;p=graphviz Make sure edges are stored in node creation order --- diff --git a/lib/cgraph/edge.c b/lib/cgraph/edge.c index 0255bb866..3828dd4f3 100644 --- a/lib/cgraph/edge.c +++ b/lib/cgraph/edge.c @@ -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)); }