summaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-10 20:11:33 -0400
committerDavid Robillard <d@drobilla.net>2021-09-10 20:11:33 -0400
commit129bcfb52322c2e27fc0e63605bc04c99ac40f8c (patch)
tree0ca0e82ca1dabe19c06397f785143a8b25ed8447 /benchmark
parentc9e48e055296a19eb6dfcac48495f690ada73087 (diff)
downloadzix-129bcfb52322c2e27fc0e63605bc04c99ac40f8c.tar.gz
zix-129bcfb52322c2e27fc0e63605bc04c99ac40f8c.tar.bz2
zix-129bcfb52322c2e27fc0e63605bc04c99ac40f8c.zip
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.
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/tree_bench.c4
1 files changed, 2 insertions, 2 deletions
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;
}