From 4c672170094ffb7a1ef6e1afeb23f55f3da417d7 Mon Sep 17 00:00:00 2001 From: Richard Kettlewell Date: Mon, 24 Mar 2008 17:40:25 +0000 Subject: [PATCH 1/1] more informative assertions --- lib/heap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/heap.h b/lib/heap.h index ebd2f60..c9913de 100644 --- a/lib/heap.h +++ b/lib/heap.h @@ -85,7 +85,7 @@ } \ \ static inline NAME##_element NAME##_first(struct NAME *heap) { \ - assert(heap->nvec > 0); \ + assert(heap->nvec > 0 && "_first"); \ return heap->vec[0]; \ } \ \ @@ -116,7 +116,7 @@ int n = 0; \ NAME##_element r; \ \ - assert(heap->nvec > 0); \ + assert(heap->nvec > 0 && "_remove"); \ r = heap->vec[0]; \ heap->vec[0] = heap->vec[--heap->nvec]; \ while(2 * n + 1 < heap->nvec) { \ -- 2.11.0