From a5ab6b8803342cce378166733bd88af81ebfa795 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 19 Nov 2022 16:20:18 -0800 Subject: [PATCH] neatogen addCorners: use a clearer iteration idiom --- lib/neatogen/adjust.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.40.0