]> mj.ucw.cz Git - leo.git/commitdiff
Labeller: Redundant num_longlines removed
authorKarryanna <karry@karryanna.cz>
Mon, 29 Jun 2015 14:58:12 +0000 (16:58 +0200)
committerKarryanna <karry@karryanna.cz>
Mon, 29 Jun 2015 14:58:12 +0000 (16:58 +0200)
labeller.c

index 750560cb050f7c197ce7b18ed257691e8a3e7693..80d69e8f1bdf755a7c8108f476b38c1f43cf1d0e 100644 (file)
@@ -29,7 +29,7 @@ static struct request_line *requests_line;
 static struct request_area *requests_area;
 
 static struct graph_edge **bfs_queue;
-static struct longline *longlines; int num_longlines;
+static struct longline *longlines;
 static struct buffer_line *buffer_line;
 static struct buffer_linelabel *buffer_linelabel;
 
@@ -617,7 +617,7 @@ void bfs(uns longline)
   if (dbg_bfs >= VERBOSITY_INDIVIDUAL)
   {
     printf("BFS called for longline %u\n", longline);
-    printf("%d longlines are believed to exist, %d exist\n", num_longlines, GARY_SIZE(longlines));
+    printf("%d longlines exist\n", GARY_SIZE(longlines));
   }
 
   for (uns i=0; i<GARY_SIZE(bfs_queue); i++)
@@ -667,18 +667,18 @@ void bfs_wrapper(void)
       if ((node->edges[i]->label) && (node->edges[i]->longline == (uns) -1))
       {
         GARY_PUSH(longlines);
-        longlines[num_longlines].first = node->edges[i];
+        longlines[GARY_SIZE(longlines)-1].first = node->edges[i];
 
         if (dbg_bfs >= VERBOSITY_INDIVIDUAL)
         {
           printf("Running new BFS\n");
-          printf("Creating longline %u\n", num_longlines);
+          printf("Creating longline %u\n", GARY_SIZE(longlines)-1);
         }
 
         GARY_RESIZE(bfs_queue, 0);
         struct graph_edge **e = GARY_PUSH(bfs_queue);
         *e = node->edges[i];
-        node->edges[i]->longline = num_longlines;
+        node->edges[i]->longline = GARY_SIZE(longlines)-1;
         bfs(node->edges[i]->longline);
 
         if (dbg_bfs >= VERBOSITY_INDIVIDUAL)
@@ -686,7 +686,6 @@ void bfs_wrapper(void)
           printf("Joined %d edges\n", dbg_num_hits); dbg_num_hits = 0;
           printf("Planned %u edges\n", GARY_SIZE(bfs_queue));
         }
-        num_longlines++;
       }
     }
   }