From 0738bfb62c5fe0980998b306134f4abebbb04b93 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 21 Nov 2021 15:32:24 -0800 Subject: [PATCH] extractMax: use a C99 bool return type instead of boolean --- lib/neatogen/closest.c | 7 ++++--- lib/neatogen/dijkstra.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/neatogen/closest.c b/lib/neatogen/closest.c index d132751f6..f104dca44 100644 --- a/lib/neatogen/closest.c +++ b/lib/neatogen/closest.c @@ -11,6 +11,7 @@ #include #include +#include #include /***************************************** @@ -138,16 +139,16 @@ static void initHeap(PairHeap * h, double *place, int *ordering, int n) } } -static boolean extractMax(PairHeap * h, Pair * max) +static bool extractMax(PairHeap * h, Pair * max) { if (h->heapSize == 0) - return FALSE; + return false; *max = h->data[0]; h->data[0] = h->data[h->heapSize - 1]; h->heapSize--; heapify(h, 0); - return TRUE; + return true; } static void insert(PairHeap * h, Pair edge) diff --git a/lib/neatogen/dijkstra.c b/lib/neatogen/dijkstra.c index d994debaf..352c8d5f7 100644 --- a/lib/neatogen/dijkstra.c +++ b/lib/neatogen/dijkstra.c @@ -21,6 +21,7 @@ #include #include #include +#include #include /* #include */ @@ -97,10 +98,10 @@ initHeap(heap * h, int startVertex, int index[], Word dist[], int n) heapify(h, j, index, dist); } -static boolean extractMax(heap * h, int *max, int index[], Word dist[]) +static bool extractMax(heap * h, int *max, int index[], Word dist[]) { if (h->heapSize == 0) - return FALSE; + return false; *max = h->data[0]; h->data[0] = h->data[h->heapSize - 1]; @@ -108,7 +109,7 @@ static boolean extractMax(heap * h, int *max, int index[], Word dist[]) h->heapSize--; heapify(h, 0, index, dist); - return TRUE; + return true; } static void -- 2.40.0