Remove some global 'using namespace's
This commit is contained in:
@ -30,13 +30,9 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
// FIXME: remove these from a header!
|
|
||||||
using namespace boost;
|
|
||||||
using namespace persistent_data;
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
|
// FIXME: give this namesace a name
|
||||||
namespace {
|
namespace {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -105,6 +101,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace persistent_data {
|
||||||
template <uint32_t BlockSize>
|
template <uint32_t BlockSize>
|
||||||
block_io<BlockSize>::block_io(std::string const &path, block_address nr_blocks, mode m)
|
block_io<BlockSize>::block_io(std::string const &path, block_address nr_blocks, mode m)
|
||||||
: nr_blocks_(nr_blocks),
|
: nr_blocks_(nr_blocks),
|
||||||
@ -533,5 +530,6 @@ block_manager<BlockSize>::is_locked(block_address b) const
|
|||||||
{
|
{
|
||||||
return tracker_.is_locked(b);
|
return tracker_.is_locked(b);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
@ -380,7 +380,7 @@ namespace persistent_data {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename ValueTraits2, typename Search>
|
template <typename ValueTraits2, typename Search>
|
||||||
optional<typename ValueTraits2::value_type>
|
boost::optional<typename ValueTraits2::value_type>
|
||||||
lookup_raw(btree_detail::ro_spine &spine, block_address block, uint64_t key) const;
|
lookup_raw(btree_detail::ro_spine &spine, block_address block, uint64_t key) const;
|
||||||
|
|
||||||
template <typename ValueTraits2>
|
template <typename ValueTraits2>
|
||||||
|
@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
// FIXME: remove
|
||||||
using namespace base;
|
using namespace base;
|
||||||
using namespace btree_detail;
|
|
||||||
using namespace persistent_data;
|
using namespace persistent_data;
|
||||||
|
using namespace btree_detail;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
using namespace persistent_data;
|
||||||
|
|
||||||
class sm_careful_alloc : public checked_space_map {
|
class sm_careful_alloc : public checked_space_map {
|
||||||
public:
|
public:
|
||||||
typedef std::shared_ptr<sm_careful_alloc> ptr;
|
typedef std::shared_ptr<sm_careful_alloc> ptr;
|
||||||
|
@ -11,9 +11,11 @@ using namespace base;
|
|||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
block_address
|
persistent_data::block_address
|
||||||
thin_provisioning::get_nr_blocks(string const &path)
|
thin_provisioning::get_nr_blocks(string const &path)
|
||||||
{
|
{
|
||||||
|
using namespace persistent_data;
|
||||||
|
|
||||||
struct stat info;
|
struct stat info;
|
||||||
block_address nr_blocks;
|
block_address nr_blocks;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
namespace thin_provisioning {
|
namespace thin_provisioning {
|
||||||
block_address get_nr_blocks(string const &path);
|
persistent_data::block_address get_nr_blocks(string const &path);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
@ -120,10 +120,10 @@ namespace thin_provisioning {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
block_manager<>::validator::ptr superblock_validator();
|
persistent_data::block_manager<>::validator::ptr superblock_validator();
|
||||||
|
|
||||||
superblock_detail::superblock read_superblock(block_manager<>::ptr bm);
|
superblock_detail::superblock read_superblock(persistent_data::block_manager<>::ptr bm);
|
||||||
void check_superblock(block_manager<>::ptr bm,
|
void check_superblock(persistent_data::block_manager<>::ptr bm,
|
||||||
superblock_detail::damage_visitor &visitor);
|
superblock_detail::damage_visitor &visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "persistent-data/space-maps/core.h"
|
#include "persistent-data/space-maps/core.h"
|
||||||
|
|
||||||
|
using namespace persistent_data;
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
void test::zero_block(block_manager<>::ptr bm, block_address b)
|
void test::zero_block(block_manager<>::ptr bm, block_address b)
|
||||||
@ -10,7 +12,8 @@ void test::zero_block(block_manager<>::ptr bm, block_address b)
|
|||||||
memset(&wr.data(), 0, sizeof(wr.data()));
|
memset(&wr.data(), 0, sizeof(wr.data()));
|
||||||
}
|
}
|
||||||
|
|
||||||
transaction_manager::ptr test::open_temporary_tm(block_manager<>::ptr bm)
|
transaction_manager::ptr
|
||||||
|
test::open_temporary_tm(block_manager<>::ptr bm)
|
||||||
{
|
{
|
||||||
space_map::ptr sm(new core_map(bm->get_nr_blocks()));
|
space_map::ptr sm(new core_map(bm->get_nr_blocks()));
|
||||||
transaction_manager::ptr tm(new transaction_manager(bm, sm));
|
transaction_manager::ptr tm(new transaction_manager(bm, sm));
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
namespace test {
|
namespace test {
|
||||||
|
using namespace persistent_data;
|
||||||
|
|
||||||
unsigned const MAX_HELD_LOCKS = 16;
|
unsigned const MAX_HELD_LOCKS = 16;
|
||||||
|
|
||||||
template <uint32_t BlockSize>
|
template <uint32_t BlockSize>
|
||||||
|
Reference in New Issue
Block a user