From 1b25ef8ac6e8a11e70a4009378564d7c63d5146f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 19 Oct 2015 13:26:00 -0400 Subject: [PATCH] buffer: make is_contiguous() const Signed-off-by: Sage Weil --- src/common/buffer.cc | 2 +- src/include/buffer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index bca14d193177..6f200bcd5d14 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -1333,7 +1333,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; } } - bool buffer::list::is_contiguous() + bool buffer::list::is_contiguous() const { return &(*_buffers.begin()) == &(*_buffers.rbegin()); } diff --git a/src/include/buffer.h b/src/include/buffer.h index f28bc5e86a77..5f90d7bdb0a6 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -434,7 +434,7 @@ public: void zero(); void zero(unsigned o, unsigned l); - bool is_contiguous(); + bool is_contiguous() const; void rebuild(); void rebuild(ptr& nb); void rebuild_aligned(unsigned align); -- 2.47.3