From: Michal Jarzabek Date: Wed, 13 May 2015 18:59:27 +0000 (+0100) Subject: buffer.h: added some consts X-Git-Tag: v9.0.2~166^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4650%2Fhead;p=ceph.git buffer.h: added some consts Signed-off-by: Michal Jarzabek --- diff --git a/src/include/buffer.h b/src/include/buffer.h index 7f3fa645aad..9af95ae9a06 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -285,13 +285,13 @@ public: bl(l), ls(&bl->_buffers), off(o), p(ip), p_off(po) { } /// get current iterator offset in buffer::list - unsigned get_off() { return off; } + unsigned get_off() const { return off; } /// get number of bytes remaining from iterator position to the end of the buffer::list - unsigned get_remaining() { return bl->length() - off; } + unsigned get_remaining() const { return bl->length() - off; } /// true if iterator is at the end of the buffer::list - bool end() { + bool end() const { return p == ls->end(); //return off == bl->length(); }