]> granicus.if.org Git - graphviz/commitdiff
label: remove unused 'RTree.Deleting'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 7 May 2022 18:06:02 +0000 (11:06 -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
lib/label/split.q.c

index 750c786c7dfc774e82e8c1a0a29ad2e17d154407..ce34522d4fdcc03817e08834899ee7f5d11ed780 100644 (file)
@@ -206,20 +206,13 @@ int RTreeInsert(RTree_t * rtp, Rect_t * r, void *data, Node_t ** n, int level)
 #      endif
 
     if (rtp->StatFlag) {
-       if (rtp->Deleting)
-           rtp->ReInsertCount++;
-       else
-           rtp->InsertCount++;
+       rtp->InsertCount++;
     }
-    if (!rtp->Deleting)
-       rtp->RectCount++;
+    rtp->RectCount++;
 
     if (RTreeInsert2(rtp, r, data, *n, &newnode, level)) {     /* root was split */
        if (rtp->StatFlag) {
-           if (rtp->Deleting)
-               rtp->DeTouchCount++;
-           else
-               rtp->InTouchCount++;
+           rtp->InTouchCount++;
        }
 
        Node_t *newroot = RTreeNewNode(rtp);    /* grow a new root, make tree taller */
@@ -257,10 +250,7 @@ RTreeInsert2(RTree_t * rtp, Rect_t * r, void *data,
     assert(level >= 0 && level <= n->level);
 
     if (rtp->StatFlag) {
-       if (rtp->Deleting)
-           rtp->DeTouchCount++;
-       else
-           rtp->InTouchCount++;
+       rtp->InTouchCount++;
     }
 
     /* Still above level for insertion, go down tree recursively */
index 9a80ac48cb41c5b323c810e11b66000438a6f4f3..25c816a9da93d6b10425fe51661b80ede4eb10f3 100644 (file)
@@ -77,8 +77,6 @@ typedef struct LeafList {
     long ElapsedTime;
     float UserTime, SystemTime;
 
-    int Deleting;
-
     /* variables for statistics */
     int StatFlag;              /* tells if we are counting or not */
     /* counters affected only when StatFlag set */
index b766c4cbb95f81f861627c24bebf5ff98ec04211..d4febbd7e8526855b524fb60d284c02fc31b9e13 100644 (file)
@@ -163,10 +163,7 @@ int AddBranch(RTree_t * rtp, Branch_t * b, Node_t * n, Node_t ** new)
        return 0;
     } else {
        if (rtp->StatFlag) {
-           if (rtp->Deleting)
-               rtp->DeTouchCount++;
-           else
-               rtp->InTouchCount++;
+           rtp->InTouchCount++;
        }
        assert(new);
        SplitNode(rtp, n, b, new);
index 5cb5cc0c11c39a8a34f19d3dd8fe99086104931c..0fb510a164adeb1be65cc76701f6f94c9ce54a4e 100644 (file)
@@ -43,10 +43,7 @@ void SplitNode(RTree_t * rtp, Node_t * n, Branch_t * b, Node_t ** nn)
 #endif
 
     if (rtp->StatFlag) {
-       if (rtp->Deleting)
-           rtp->DeSplitCount++;
-       else
-           rtp->InSplitCount++;
+       rtp->InSplitCount++;
     }
 
     /* load all the branches into a buffer, initialize old node */
@@ -70,7 +67,7 @@ void SplitNode(RTree_t * rtp, Node_t * n, Branch_t * b, Node_t ** nn)
     int area = RectArea(&p->cover[0]) + RectArea(&p->cover[1]);
 
     /* record how good the split was for statistics */
-    if (rtp->StatFlag && !rtp->Deleting && area)
+    if (rtp->StatFlag && area)
        rtp->SplitMeritSum += (float) rtp->split.CoverSplitArea / area;
 
     /* put branches from buffer into 2 nodes according to chosen partition */