X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/8e3fe3d8ea9f5e75b6f1be4e4ae8cf2c16db88e3..4c672170094ffb7a1ef6e1afeb23f55f3da417d7:/lib/heap.h 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) { \