From db2f5d41cb717b553fe137878f6f41fd8f21ce29 Mon Sep 17 00:00:00 2001 From: Karryanna Date: Mon, 29 Jun 2015 16:58:12 +0200 Subject: [PATCH] Labeller: Redundant num_longlines removed --- labeller.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/labeller.c b/labeller.c index 750560c..80d69e8 100644 --- a/labeller.c +++ b/labeller.c @@ -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; iedges[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++; } } } -- 2.39.2