]> granicus.if.org Git - graphviz/commitdiff
remove unused newQueue and delQueue
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 May 2021 18:25:42 +0000 (11:25 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 28 May 2021 00:03:30 +0000 (17:03 -0700)
These functions were intended for callers who want to allocate a Queue on the
heap. However, this is unnecessary and callers all locate their Queue objects on
the stack and use mkQueue and freeQueue instead. This removal cleans up the code
a little and squashes two -Wmissing-prototypes warnings.

lib/neatogen/bfs.c

index 944ca324068c48ef12c3ce80a2c06e1cc04ca35f..84ea8d39679cdd51d3d6cf6ebde38a3185994faf 100644 (file)
@@ -117,24 +117,11 @@ void mkQueue(Queue * qp, int size)
     qp->start = qp->end = 0;
 }
 
-Queue *newQueue(int size)
-{
-    Queue *qp = GNEW(Queue);
-    mkQueue(qp, size);
-    return qp;
-}
-
 void freeQueue(Queue * qp)
 {
     free(qp->data);
 }
 
-void delQueue(Queue * qp)
-{
-    free(qp->data);
-    free(qp);
-}
-
 void initQueue(Queue * qp, int startVertex)
 {
     qp->data[0] = startVertex;