make root_size() and copy_root() const
This commit is contained in:
parent
f503cf7fbe
commit
a162073291
@ -54,9 +54,8 @@ namespace persistent_data {
|
|||||||
public:
|
public:
|
||||||
typedef boost::shared_ptr<persistent_space_map> ptr;
|
typedef boost::shared_ptr<persistent_space_map> ptr;
|
||||||
|
|
||||||
// FIXME: these two should be const
|
virtual size_t root_size() const = 0;
|
||||||
virtual size_t root_size() = 0;
|
virtual void copy_root(void *dest, size_t len) const = 0;
|
||||||
virtual void copy_root(void *dest, size_t len) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class checked_space_map : public persistent_space_map {
|
class checked_space_map : public persistent_space_map {
|
||||||
|
@ -381,11 +381,11 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t root_size() {
|
virtual size_t root_size() const {
|
||||||
return sizeof(sm_root_disk);
|
return sizeof(sm_root_disk);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void copy_root(void *dest, size_t len) {
|
virtual void copy_root(void *dest, size_t len) const {
|
||||||
sm_root_disk d;
|
sm_root_disk d;
|
||||||
sm_root v;
|
sm_root v;
|
||||||
|
|
||||||
|
@ -120,13 +120,13 @@ namespace {
|
|||||||
sm_->iterate(it);
|
sm_->iterate(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t root_size() {
|
virtual size_t root_size() const {
|
||||||
cant_recurse("root_size");
|
cant_recurse("root_size");
|
||||||
recursing_const_lock lock(*this);
|
recursing_const_lock lock(*this);
|
||||||
return sm_->root_size();
|
return sm_->root_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void copy_root(void *dest, size_t len) {
|
virtual void copy_root(void *dest, size_t len) const {
|
||||||
cant_recurse("copy_root");
|
cant_recurse("copy_root");
|
||||||
recursing_const_lock lock(*this);
|
recursing_const_lock lock(*this);
|
||||||
return sm_->copy_root(dest, len);
|
return sm_->copy_root(dest, len);
|
||||||
|
Loading…
Reference in New Issue
Block a user