rename NoOpRefCounter -> no_op_ref_counter

This commit is contained in:
Joe Thornber 2013-02-01 13:04:05 +00:00
parent 4eadd9438e
commit 7d18b08b91
4 changed files with 8 additions and 9 deletions

View File

@ -29,9 +29,8 @@
//----------------------------------------------------------------
namespace persistent_data {
// FIXME: why is this class capitalised? fix.
template <typename ValueType>
class NoOpRefCounter {
class no_op_ref_counter {
public:
void inc(ValueType const &v) {}
void dec(ValueType const &v) {}
@ -40,7 +39,7 @@ namespace persistent_data {
struct uint64_traits {
typedef base::__le64 disk_type;
typedef uint64_t value_type;
typedef NoOpRefCounter<uint64_t> ref_counter;
typedef no_op_ref_counter<uint64_t> ref_counter;
static void unpack(disk_type const &disk, value_type &value) {
value = base::to_cpu<uint64_t>(disk);
@ -359,7 +358,7 @@ namespace persistent_data {
typename persistent_data::transaction_manager::ptr tm_;
bool destroy_;
block_address root_;
NoOpRefCounter<uint64_t> internal_rc_;
no_op_ref_counter<uint64_t> internal_rc_;
typename ValueTraits::ref_counter rc_;
};
};

View File

@ -196,7 +196,7 @@ namespace {
struct ref_count_traits {
typedef __le32 disk_type;
typedef uint32_t value_type;
typedef NoOpRefCounter<uint32_t> ref_counter;
typedef no_op_ref_counter<uint32_t> ref_counter;
static void unpack(disk_type const &d, value_type &v) {
v = to_cpu<value_type>(d);

View File

@ -45,7 +45,7 @@ namespace persistent_data {
struct index_entry_traits {
typedef index_entry_disk disk_type;
typedef index_entry value_type;
typedef NoOpRefCounter<index_entry> ref_counter;
typedef no_op_ref_counter<index_entry> ref_counter;
static void unpack(disk_type const &disk, value_type &value) {
value.blocknr_ = to_cpu<uint64_t>(disk.blocknr_);
@ -88,7 +88,7 @@ namespace persistent_data {
struct sm_root_traits {
typedef sm_root_disk disk_type;
typedef sm_root value_type;
typedef NoOpRefCounter<sm_root> ref_counter;
typedef no_op_ref_counter<sm_root> ref_counter;
static void unpack(disk_type const &disk, value_type &value) {
value.nr_blocks_ = to_cpu<uint64_t>(disk.nr_blocks_);

View File

@ -44,7 +44,7 @@ namespace thin_provisioning {
struct device_details_traits {
typedef device_details_disk disk_type;
typedef device_details value_type;
typedef persistent_data::NoOpRefCounter<device_details> ref_counter;
typedef persistent_data::no_op_ref_counter<device_details> ref_counter;
static void unpack(device_details_disk const &disk, device_details &value);
static void pack(device_details const &value, device_details_disk &disk);
@ -123,7 +123,7 @@ namespace thin_provisioning {
struct superblock_traits {
typedef superblock_disk disk_type;
typedef superblock value_type;
typedef NoOpRefCounter<superblock> ref_counter;
typedef no_op_ref_counter<superblock> ref_counter;
static void unpack(superblock_disk const &disk, superblock &value);
static void pack(superblock const &value, superblock_disk &disk);