]> granicus.if.org Git - graphviz/commitdiff
neatogen rePos: use a clearer iteration idiom
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Nov 2022 00:21:32 +0000 (16:21 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 25 Nov 2022 18:33:31 +0000 (10:33 -0800)
lib/neatogen/adjust.c

index 910518230061332a6fd89f22753eef35b38a57f2..f4c99b65405750fe0cbe84b6dbcf4ba56c57e9b0 100644 (file)
@@ -537,13 +537,12 @@ static int vAdjust(void)
 
 static double rePos(void)
 {
-    Info_t *ip = nodeInfo;
     double f = 1.0 + incr;
 
     for (size_t i = 0; i < nsites; i++) {
+       Info_t *ip = &nodeInfo[i];
        ip->site.coord.x *= f;
        ip->site.coord.y *= f;
-       ip++;
     }
     return f;
 }