[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:
Joe Thornber
2020-04-30 15:02:43 +01:00
parent e801cc607b
commit 4313469475
40 changed files with 78 additions and 94 deletions

View File

@@ -61,7 +61,7 @@ namespace {
class validator_mock : public bcache::validator {
public:
typedef boost::shared_ptr<validator_mock> ptr;
typedef std::shared_ptr<validator_mock> ptr;
MOCK_CONST_METHOD2(check, void(void const *, block_address));
MOCK_CONST_METHOD1(check_raw, bool(void const *data));

View File

@@ -66,7 +66,7 @@ namespace {
//--------------------------------
struct node_info {
typedef boost::shared_ptr<node_info> ptr;
typedef std::shared_ptr<node_info> ptr;
btree_detail::btree_path path;
@@ -170,7 +170,7 @@ namespace {
public:
typedef btree_detail::node_location node_location;
typedef btree<Levels, ValueTraits> tree;
typedef boost::shared_ptr<btree_layout_visitor> ptr;
typedef std::shared_ptr<btree_layout_visitor> ptr;
virtual bool visit_internal(node_location const &loc,
typename tree::internal_node const &n) {

View File

@@ -19,8 +19,6 @@
#include "gmock/gmock.h"
#include "persistent-data/cache.h"
#include <boost/shared_ptr.hpp>
using namespace boost;
using namespace base;
using namespace std;
@@ -55,7 +53,7 @@ namespace {
struct SharedThingTraits {
typedef unsigned key_type;
typedef boost::shared_ptr<Thing> value_type;
typedef std::shared_ptr<Thing> value_type;
static key_type get_key(value_type const &p) {
return p->key_;

View File

@@ -61,7 +61,7 @@ namespace {
class devices_visitor : public detail_tree::visitor {
public:
struct node_info {
typedef boost::shared_ptr<node_info> ptr;
typedef std::shared_ptr<node_info> ptr;
bool leaf;
unsigned depth;
@@ -71,7 +71,7 @@ namespace {
};
typedef btree_detail::node_location node_location;
typedef boost::shared_ptr<devices_visitor> ptr;
typedef std::shared_ptr<devices_visitor> ptr;
virtual bool visit_internal(node_location const &loc,
detail_tree::internal_node const &n) {