]> granicus.if.org Git - graphviz/commitdiff
label: remove unused 'RTree.*LeafCount' tracking
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 7 May 2022 18:03:16 +0000 (11:03 -0700)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 18 Jun 2022 14:44:13 +0000 (16:44 +0200)
lib/label/index.c
lib/label/index.h
lib/label/node.c

index 9aa4d72c93da0afa4c35bc96c7f65d8600cbe0ed..750c786c7dfc774e82e8c1a0a29ad2e17d154407 100644 (file)
@@ -63,7 +63,6 @@ Node_t *RTreeNewIndex(RTree_t * rtp)
 {
     Node_t *x = RTreeNewNode(rtp);
     x->level = 0;              /* leaf */
-    rtp->LeafCount++;
     return x;
 }
 
@@ -224,7 +223,6 @@ int RTreeInsert(RTree_t * rtp, Rect_t * r, void *data, Node_t ** n, int level)
        }
 
        Node_t *newroot = RTreeNewNode(rtp);    /* grow a new root, make tree taller */
-       rtp->NonLeafCount++;
        newroot->level = (*n)->level + 1;
        b.rect = NodeCover(*n);
        b.child = *n;
index 5bf0df93a6a299ee0fb6a650d0926b2ca19205f5..9a80ac48cb41c5b323c810e11b66000438a6f4f3 100644 (file)
@@ -98,7 +98,6 @@ typedef struct LeafList {
     /* counters used even when StatFlag not set */
     int RectCount;
     int NodeCount;
-    int LeafCount, NonLeafCount;
     int EntryCount;
     int SearchCount;
     int HitCount;
index aab895825160b8a826d4ca022f2c6eb37d380960..b766c4cbb95f81f861627c24bebf5ff98ec04211 100644 (file)
@@ -170,10 +170,6 @@ int AddBranch(RTree_t * rtp, Branch_t * b, Node_t * n, Node_t ** new)
        }
        assert(new);
        SplitNode(rtp, n, b, new);
-       if (n->level == 0)
-           rtp->LeafCount++;
-       else
-           rtp->NonLeafCount++;
        return 1;
     }
 }