From: Matthew Fernandez Date: Sun, 20 Nov 2022 00:20:18 +0000 (-0800) Subject: neatogen addCorners: use a clearer iteration idiom X-Git-Tag: 7.0.3~1^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5ab6b8803342cce378166733bd88af81ebfa795;p=graphviz neatogen addCorners: use a clearer iteration idiom --- diff --git a/lib/neatogen/adjust.c b/lib/neatogen/adjust.c index 3fa7966f3..c39d8309b 100644 --- a/lib/neatogen/adjust.c +++ b/lib/neatogen/adjust.c @@ -416,8 +416,8 @@ static void addCorners(void) double ned = dist_2(&ip->site.coord, &ne); double d; - ip++; for (size_t i = 1; i < nsites; i++) { + ip = &nodeInfo[i]; d = dist_2(&ip->site.coord, &sw); if (d < swd) { swd = d; @@ -438,7 +438,6 @@ static void addCorners(void) ned = d; nes = ip; } - ip++; } addVertex(&sws->site, sw.x, sw.y);