diff --git a/caching/hint_array.cc b/caching/hint_array.cc index cb9f2f1..66a3a27 100644 --- a/caching/hint_array.cc +++ b/caching/hint_array.cc @@ -38,16 +38,16 @@ namespace { xx(4); template - shared_ptr mk_array(transaction_manager &tm) { + boost::shared_ptr mk_array(transaction_manager &tm) { typedef hint_traits traits; - typedef array ha; + typedef persistent_data::array ha; - shared_ptr r = typename ha::ptr(new ha(tm, typename traits::ref_counter())); + boost::shared_ptr r = typename ha::ptr(new ha(tm, typename traits::ref_counter())); return r; } - shared_ptr mk_array(transaction_manager &tm, uint32_t width) { + boost::shared_ptr mk_array(transaction_manager &tm, uint32_t width) { switch (width) { #define xx(n) case n: return mk_array(tm) @@ -58,15 +58,15 @@ namespace { } // never get here - return shared_ptr(); + return boost::shared_ptr(); } //-------------------------------- template - shared_ptr - downcast_array(shared_ptr base) { - shared_ptr a = dynamic_pointer_cast(base); + boost::shared_ptr + downcast_array(boost::shared_ptr base) { + boost::shared_ptr a = dynamic_pointer_cast(base); if (!a) throw runtime_error("internal error: couldn't cast hint array"); @@ -76,16 +76,16 @@ namespace { //-------------------------------- template - shared_ptr mk_array(transaction_manager &tm, block_address root, unsigned nr_entries) { + boost::shared_ptr mk_array(transaction_manager &tm, block_address root, unsigned nr_entries) { typedef hint_traits traits; - typedef array ha; + typedef persistent_data::array ha; - shared_ptr r = typename ha::ptr(new ha(tm, typename traits::ref_counter(), root, nr_entries)); + boost::shared_ptr r = typename ha::ptr(new ha(tm, typename traits::ref_counter(), root, nr_entries)); return r; } - shared_ptr mk_array(transaction_manager &tm, uint32_t width, block_address root, unsigned nr_entries) { + boost::shared_ptr mk_array(transaction_manager &tm, uint32_t width, block_address root, unsigned nr_entries) { switch (width) { #define xx(n) case n: return mk_array(tm, root, nr_entries) all_widths @@ -95,21 +95,21 @@ namespace { } // never get here - return shared_ptr(); + return boost::shared_ptr(); } //-------------------------------- template - void get_hint(shared_ptr base, unsigned index, vector &data) { + void get_hint(boost::shared_ptr base, unsigned index, vector &data) { typedef hint_traits traits; - typedef array ha; + typedef persistent_data::array ha; - shared_ptr a = downcast_array(base); + boost::shared_ptr a = downcast_array(base); data = a->get(index); } - void get_hint_(uint32_t width, shared_ptr base, unsigned index, vector &data) { + void get_hint_(uint32_t width, boost::shared_ptr base, unsigned index, vector &data) { switch (width) { #define xx(n) case n: return get_hint(base, index, data) all_widths @@ -120,15 +120,15 @@ namespace { //-------------------------------- template - void set_hint(shared_ptr base, unsigned index, vector const &data) { + void set_hint(boost::shared_ptr base, unsigned index, vector const &data) { typedef hint_traits traits; - typedef array ha; + typedef persistent_data::array ha; - shared_ptr a = downcast_array(base); + boost::shared_ptr a = downcast_array(base); a->set(index, data); } - void set_hint_(uint32_t width, shared_ptr base, + void set_hint_(uint32_t width, boost::shared_ptr base, unsigned index, vector const &data) { switch (width) { #define xx(n) case n: return set_hint(base, index, data) @@ -140,15 +140,15 @@ namespace { //-------------------------------- template - void grow(shared_ptr base, unsigned new_nr_entries, vector const &value) { + void grow(boost::shared_ptr base, unsigned new_nr_entries, vector const &value) { typedef hint_traits traits; - typedef array ha; + typedef persistent_data::array ha; - shared_ptr a = downcast_array(base); + boost::shared_ptr a = downcast_array(base); a->grow(new_nr_entries, value); } - void grow_(uint32_t width, shared_ptr base, + void grow_(uint32_t width, boost::shared_ptr base, unsigned new_nr_entries, vector const &value) { switch (width) { @@ -194,17 +194,17 @@ namespace { }; template - void walk_hints(shared_ptr base, hint_visitor &hv, damage_visitor &dv) { + void walk_hints(boost::shared_ptr base, hint_visitor &hv, damage_visitor &dv) { typedef hint_traits traits; - typedef array ha; + typedef persistent_data::array ha; - shared_ptr a = downcast_array(base); + boost::shared_ptr a = downcast_array(base); value_adapter vv(hv); ll_damage_visitor ll(dv); a->visit_values(vv, ll); } - void walk_hints_(uint32_t width, shared_ptr base, + void walk_hints_(uint32_t width, boost::shared_ptr base, hint_visitor &hv, damage_visitor &dv) { switch (width) { #define xx(n) case n: walk_hints(base, hv, dv); break diff --git a/persistent-data/space_map.h b/persistent-data/space_map.h index 5395c90..823b4ba 100644 --- a/persistent-data/space_map.h +++ b/persistent-data/space_map.h @@ -119,6 +119,7 @@ namespace persistent_data { namespace space_map_detail { class damage { + public: virtual ~damage() {} }; diff --git a/unit-tests/bloom_filter_t.cc b/unit-tests/bloom_filter_t.cc index 032eb48..13c2418 100644 --- a/unit-tests/bloom_filter_t.cc +++ b/unit-tests/bloom_filter_t.cc @@ -40,7 +40,7 @@ namespace { using namespace boost::random; - uniform_int_distribution uniform_dist(0, max); + boost::random::uniform_int_distribution uniform_dist(0, max); while (r.size() < count) { block_address b = uniform_dist(rng_);