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

index c39d8309b7486892baf661aeadbe0850d13d25de..910518230061332a6fd89f22753eef35b38a57f2 100644 (file)
@@ -456,13 +456,11 @@ static void addCorners(void)
   */
 static void newPos(void)
 {
-    Info_t *ip = nodeInfo;
-
     addCorners();
     for (size_t i = 0; i < nsites; i++) {
+       Info_t *ip = &nodeInfo[i];
        if (doAll || ip->overlaps)
            newpos(ip);
-       ip++;
     }
 }