From 129bcfb52322c2e27fc0e63605bc04c99ac40f8c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 10 Sep 2021 20:11:33 -0400 Subject: Remove destroy field of BTree and add zix_btree_clear() If this is used, it is only when clearing or freeing a tree. Allowing it to be given as a parameter directly there is clearer and avoids bloating the tree itself with information that isn't needed. --- benchmark/tree_bench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'benchmark') diff --git a/benchmark/tree_bench.c b/benchmark/tree_bench.c index f57538d..e01b64f 100644 --- a/benchmark/tree_bench.c +++ b/benchmark/tree_bench.c @@ -156,7 +156,7 @@ bench_zix_btree(size_t n_elems, uintptr_t r = 0u; ZixBTreeIter* ti = NULL; - ZixBTree* t = zix_btree_new(int_cmp, NULL, NULL); + ZixBTree* t = zix_btree_new(int_cmp, NULL); // Insert n_elems elements struct timespec insert_start = bench_start(); @@ -205,7 +205,7 @@ bench_zix_btree(size_t n_elems, } fprintf(del_dat, "\t%lf", bench_end(&del_start)); - zix_btree_free(t); + zix_btree_free(t, NULL); return EXIT_SUCCESS; } -- cgit v1.2.1