From: Matthew Fernandez Date: Sun, 20 Nov 2022 00:09:10 +0000 (-0800) Subject: neatogen makeInfo: use a clearer iteration idiom X-Git-Tag: 7.0.3~1^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32c0a8066f45471bd0ee290c89b720ecd567a32b;p=graphviz neatogen makeInfo: use a clearer iteration idiom --- diff --git a/lib/neatogen/adjust.c b/lib/neatogen/adjust.c index d5eae6376..7ede420fa 100644 --- a/lib/neatogen/adjust.c +++ b/lib/neatogen/adjust.c @@ -131,7 +131,6 @@ static void chkBoundBox(Agraph_t * graph) static int makeInfo(Agraph_t * graph) { Agnode_t *node; - Info_t *ip; expand_t pmargin; int (*polyf)(Poly *, Agnode_t *, float, float); @@ -142,7 +141,6 @@ static int makeInfo(Agraph_t * graph) nodeInfo = gv_calloc(nsites, sizeof(Info_t)); node = agfstnode(graph); - ip = nodeInfo; pmargin = sepFactor (graph); @@ -155,6 +153,7 @@ static int makeInfo(Agraph_t * graph) else polyf = makePoly; for (size_t i = 0; i < nsites; i++) { + Info_t *ip = &nodeInfo[i]; ip->site.coord.x = ND_pos(node)[0]; ip->site.coord.y = ND_pos(node)[1]; @@ -169,7 +168,6 @@ static int makeInfo(Agraph_t * graph) ip->node = node; ip->verts = NULL; node = agnxtnode(graph, node); - ip++; } return 0; }