common: buffer::ptr::cmp() is a const function

Signed-off-by: David Zafman <david.zafman@inktank.com>
This commit is contained in:
David Zafman 2014-01-29 17:08:50 -08:00
parent 34eb549cd4
commit e1bfed52f9
2 changed files with 2 additions and 2 deletions

View File

@ -664,7 +664,7 @@ static uint32_t simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZE
return _raw->len - _len; return _raw->len - _len;
} }
int buffer::ptr::cmp(const ptr& o) int buffer::ptr::cmp(const ptr& o) const
{ {
int l = _len < o._len ? _len : o._len; int l = _len < o._len ? _len : o._len;
if (l) { if (l) {

View File

@ -208,7 +208,7 @@ public:
unsigned wasted(); unsigned wasted();
int cmp(const ptr& o); int cmp(const ptr& o) const;
bool is_zero() const; bool is_zero() const;
// modifiers // modifiers