[all] Switch from boost::shared_ptr -> std::shared_ptr.
Shared_ptr has moved into the standard library since these tools were first written.
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -40,7 +39,7 @@ namespace persistent_data {
|
||||
|
||||
class block_manager : private boost::noncopyable {
|
||||
public:
|
||||
typedef boost::shared_ptr<block_manager> ptr;
|
||||
typedef std::shared_ptr<block_manager> ptr;
|
||||
|
||||
enum mode {
|
||||
READ_ONLY,
|
||||
|
@@ -75,7 +75,7 @@ namespace persistent_data {
|
||||
};
|
||||
|
||||
struct damage {
|
||||
typedef boost::shared_ptr<damage> ptr;
|
||||
typedef std::shared_ptr<damage> ptr;
|
||||
|
||||
damage(run<uint32_t> lost_keys,
|
||||
std::string const &desc)
|
||||
@@ -222,7 +222,7 @@ namespace persistent_data {
|
||||
typedef array_block<ValueTraits, block_manager::write_ref> wblock;
|
||||
typedef array_block<ValueTraits, block_manager::read_ref> rblock;
|
||||
|
||||
typedef boost::shared_ptr<array<ValueTraits> > ptr;
|
||||
typedef std::shared_ptr<array<ValueTraits> > ptr;
|
||||
typedef typename ValueTraits::value_type value_type;
|
||||
typedef typename ValueTraits::ref_counter ref_counter;
|
||||
|
||||
|
@@ -36,7 +36,7 @@ namespace persistent_data {
|
||||
template <typename ValueTraits, typename RefType>
|
||||
class array_block {
|
||||
public:
|
||||
typedef boost::shared_ptr<array_block> ptr;
|
||||
typedef std::shared_ptr<array_block> ptr;
|
||||
typedef typename ValueTraits::disk_type disk_type;
|
||||
typedef typename ValueTraits::value_type value_type;
|
||||
typedef typename ValueTraits::ref_counter ref_counter;
|
||||
|
@@ -30,7 +30,7 @@ namespace persistent_data {
|
||||
|
||||
class bitset_impl {
|
||||
public:
|
||||
typedef boost::shared_ptr<bitset_impl> ptr;
|
||||
typedef std::shared_ptr<bitset_impl> ptr;
|
||||
typedef persistent_data::transaction_manager::ptr tm_ptr;
|
||||
|
||||
bitset_impl(transaction_manager &tm)
|
||||
|
@@ -38,7 +38,7 @@ namespace persistent_data {
|
||||
|
||||
class bitset_visitor {
|
||||
public:
|
||||
typedef boost::shared_ptr<bitset_visitor> ptr;
|
||||
typedef std::shared_ptr<bitset_visitor> ptr;
|
||||
|
||||
virtual ~bitset_visitor() {}
|
||||
virtual void visit(uint32_t index, bool value) = 0;
|
||||
@@ -48,7 +48,7 @@ namespace persistent_data {
|
||||
|
||||
class bitset {
|
||||
public:
|
||||
typedef boost::shared_ptr<bitset> ptr;
|
||||
typedef std::shared_ptr<bitset> ptr;
|
||||
|
||||
bitset(transaction_manager &tm);
|
||||
bitset(transaction_manager &tm,
|
||||
@@ -66,7 +66,7 @@ namespace persistent_data {
|
||||
void walk_bitset(bitset_detail::bitset_visitor &v) const;
|
||||
|
||||
private:
|
||||
boost::shared_ptr<bitset_detail::bitset_impl> impl_;
|
||||
std::shared_ptr<bitset_detail::bitset_impl> impl_;
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -4,14 +4,12 @@
|
||||
#include "persistent-data/transaction_manager.h"
|
||||
#include "persistent-data/data-structures/bitset.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace persistent_data {
|
||||
class bloom_filter {
|
||||
public:
|
||||
typedef boost::shared_ptr<bloom_filter> ptr;
|
||||
typedef std::shared_ptr<bloom_filter> ptr;
|
||||
|
||||
// nr_bits must be a power of two
|
||||
bloom_filter(transaction_manager &tm,
|
||||
|
@@ -298,7 +298,7 @@ namespace persistent_data {
|
||||
template <unsigned Levels, typename ValueTraits>
|
||||
class btree {
|
||||
public:
|
||||
typedef boost::shared_ptr<btree<Levels, ValueTraits> > ptr;
|
||||
typedef std::shared_ptr<btree<Levels, ValueTraits> > ptr;
|
||||
|
||||
typedef uint64_t key[Levels];
|
||||
typedef typename ValueTraits::value_type value_type;
|
||||
@@ -338,7 +338,7 @@ namespace persistent_data {
|
||||
// inspect the individual nodes that make up a btree.
|
||||
class visitor {
|
||||
public:
|
||||
typedef boost::shared_ptr<visitor> ptr;
|
||||
typedef std::shared_ptr<visitor> ptr;
|
||||
typedef btree_detail::node_location node_location;
|
||||
|
||||
virtual ~visitor() {}
|
||||
|
@@ -10,7 +10,7 @@
|
||||
namespace persistent_data {
|
||||
namespace btree_detail {
|
||||
struct damage {
|
||||
typedef boost::shared_ptr<damage> ptr;
|
||||
typedef std::shared_ptr<damage> ptr;
|
||||
|
||||
damage(run<uint64_t> lost_keys,
|
||||
std::string const &desc)
|
||||
|
@@ -19,15 +19,13 @@
|
||||
#ifndef REF_COUNTER_H
|
||||
#define REF_COUNTER_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace persistent_data {
|
||||
template <typename ValueType>
|
||||
class ref_counter {
|
||||
public:
|
||||
boost::shared_ptr<ref_counter<ValueType> > ptr;
|
||||
std::shared_ptr<ref_counter<ValueType> > ptr;
|
||||
|
||||
virtual ~ref_counter() {}
|
||||
|
||||
|
@@ -20,8 +20,8 @@
|
||||
#define ERROR_SET_H
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace persistent_data {
|
||||
// user can control how much detail is displayed.
|
||||
class error_set {
|
||||
public:
|
||||
typedef boost::shared_ptr<error_set> ptr;
|
||||
typedef std::shared_ptr<error_set> ptr;
|
||||
|
||||
error_set(std::string const &err);
|
||||
|
||||
|
@@ -19,8 +19,6 @@
|
||||
#include "persistent-data/space-maps/careful_alloc.h"
|
||||
#include "persistent-data/space-maps/subtracting_span_iterator.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
@@ -30,7 +28,7 @@ namespace {
|
||||
|
||||
class sm_careful_alloc : public checked_space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<sm_careful_alloc> ptr;
|
||||
typedef std::shared_ptr<sm_careful_alloc> ptr;
|
||||
|
||||
sm_careful_alloc(checked_space_map::ptr sm)
|
||||
: sm_(sm) {
|
||||
|
@@ -26,7 +26,7 @@
|
||||
namespace persistent_data {
|
||||
class core_map : public checked_space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<core_map> ptr;
|
||||
typedef std::shared_ptr<core_map> ptr;
|
||||
|
||||
core_map(block_address nr_blocks)
|
||||
: counts_(nr_blocks, 0),
|
||||
|
@@ -250,7 +250,7 @@ namespace {
|
||||
#if 0
|
||||
class ref_count_checker : public btree_checker<1, ref_count_traits> {
|
||||
public:
|
||||
typedef boost::shared_ptr<ref_count_checker> ptr;
|
||||
typedef std::shared_ptr<ref_count_checker> ptr;
|
||||
|
||||
ref_count_checker(block_counter &counter)
|
||||
: btree_checker<1, ref_count_traits>(counter) {
|
||||
@@ -267,7 +267,7 @@ namespace {
|
||||
|
||||
class index_store {
|
||||
public:
|
||||
typedef boost::shared_ptr<index_store> ptr;
|
||||
typedef std::shared_ptr<index_store> ptr;
|
||||
|
||||
virtual ~index_store() {}
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace {
|
||||
|
||||
class sm_disk : public checked_space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<sm_disk> ptr;
|
||||
typedef std::shared_ptr<sm_disk> ptr;
|
||||
typedef transaction_manager::read_ref read_ref;
|
||||
typedef transaction_manager::write_ref write_ref;
|
||||
|
||||
@@ -635,7 +635,7 @@ namespace {
|
||||
|
||||
class btree_index_store : public index_store {
|
||||
public:
|
||||
typedef boost::shared_ptr<btree_index_store> ptr;
|
||||
typedef std::shared_ptr<btree_index_store> ptr;
|
||||
|
||||
btree_index_store(transaction_manager &tm)
|
||||
: tm_(tm),
|
||||
@@ -714,7 +714,7 @@ namespace {
|
||||
|
||||
class metadata_index_store : public index_store {
|
||||
public:
|
||||
typedef boost::shared_ptr<metadata_index_store> ptr;
|
||||
typedef std::shared_ptr<metadata_index_store> ptr;
|
||||
|
||||
metadata_index_store(transaction_manager &tm)
|
||||
: tm_(tm) {
|
||||
|
@@ -26,7 +26,7 @@
|
||||
namespace persistent_data {
|
||||
class noop_map : public checked_space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<noop_map> ptr;
|
||||
typedef std::shared_ptr<noop_map> ptr;
|
||||
|
||||
block_address get_nr_blocks() const {
|
||||
fail();
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include "persistent-data/block_counter.h"
|
||||
#include "persistent-data/run.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <functional>
|
||||
|
||||
@@ -36,7 +35,7 @@ namespace persistent_data {
|
||||
|
||||
class space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<space_map> ptr;
|
||||
typedef std::shared_ptr<space_map> ptr;
|
||||
|
||||
virtual ~space_map() {};
|
||||
|
||||
@@ -140,7 +139,7 @@ namespace persistent_data {
|
||||
|
||||
class persistent_space_map : public space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<persistent_space_map> ptr;
|
||||
typedef std::shared_ptr<persistent_space_map> ptr;
|
||||
|
||||
virtual void count_metadata(block_counter &bc) const = 0;
|
||||
virtual size_t root_size() const = 0;
|
||||
@@ -149,7 +148,7 @@ namespace persistent_data {
|
||||
|
||||
class checked_space_map : public persistent_space_map {
|
||||
public:
|
||||
typedef boost::shared_ptr<checked_space_map> ptr;
|
||||
typedef std::shared_ptr<checked_space_map> ptr;
|
||||
|
||||
virtual void visit(space_map_detail::visitor &v) const {
|
||||
throw std::runtime_error("space_map.visit not implemented");
|
||||
|
@@ -23,14 +23,13 @@
|
||||
#include "space_map.h"
|
||||
|
||||
#include <set>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace persistent_data {
|
||||
class transaction_manager : boost::noncopyable {
|
||||
public:
|
||||
typedef boost::shared_ptr<transaction_manager> ptr;
|
||||
typedef std::shared_ptr<transaction_manager> ptr;
|
||||
typedef block_manager::read_ref read_ref;
|
||||
typedef block_manager::write_ref write_ref;
|
||||
typedef bcache::validator::ptr validator;
|
||||
|
Reference in New Issue
Block a user