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