[btree] visitor now passed as a reference rather than shared_ptr

This commit is contained in:
Joe Thornber
2013-05-02 12:31:33 +01:00
parent 5913de5e38
commit a828cde96d
7 changed files with 23 additions and 24 deletions

View File

@ -91,7 +91,7 @@ namespace {
void check_constraints(btree<1, uint64_traits>::ptr tree) {
typedef btree<1, uint64_traits> tree_type;
tree_type::visitor::ptr v(new constraint_visitor);
constraint_visitor v;
tree->visit_depth_first(v);
}
}

View File

@ -355,12 +355,12 @@ TEST_F(DeviceCheckerTests, damaging_some_btree_nodes_results_in_the_correct_devi
b.build();
devices_visitor::ptr scanner(new devices_visitor);
devices_visitor scanner;
transaction_manager::ptr tm = open_temporary_tm(bm_);
detail_tree::ptr devices(new detail_tree(tm, devices_root(),
device_details_traits::ref_counter()));
devices->visit_depth_first(scanner);
devices_visitor::node_info n = scanner->random_node();
devices_visitor::node_info n = scanner.random_node();
zero_block(n.b);
damage_list_ptr damage = mk_checker()->check();