From ad8a70ce7653d96617b9033b48a2d20ffe951cae Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 11 Oct 2011 12:46:23 +0100 Subject: [PATCH] fix another breakage in btree_checker --- btree_checker.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/btree_checker.h b/btree_checker.h index d5e1f70..17b1d02 100644 --- a/btree_checker.h +++ b/btree_checker.h @@ -83,14 +83,14 @@ namespace persistent_data { check_sum(n); - if (!key) + if (sub_root) new_root(level); check_block_nr(n); check_max_entries(n); check_nr_entries(n, sub_root); check_ordered_keys(n); - check_parent_key(key, n); + check_parent_key(sub_root ? optional() : key, n); return true; } @@ -103,14 +103,14 @@ namespace persistent_data { check_sum(n); - if (!key) + if (sub_root) new_root(level); check_block_nr(n); check_max_entries(n); check_nr_entries(n, sub_root); check_ordered_keys(n); - check_parent_key(key, n); + check_parent_key(sub_root ? optional() : key, n); check_leaf_key(level, n); return true; @@ -125,14 +125,14 @@ namespace persistent_data { check_sum(n); - if (!key) + if (sub_root) new_root(level); check_block_nr(n); check_max_entries(n); check_nr_entries(n, sub_root); check_ordered_keys(n); - check_parent_key(key, n); + check_parent_key(sub_root ? optional() : key, n); check_leaf_key(level, n); return true; }