From fdd1982c1f3468f5003ce772779d657cfa5fe3ef Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 7 Oct 2013 02:32:15 -0600 Subject: [PATCH] Make clang happy with SBuf API Basic types are passed by-value and const is useless. Clang is quite strict and treats this as a build error. --- src/SBuf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SBuf.h b/src/SBuf.h index 15c80cf684..7a073640ec 100644 --- a/src/SBuf.h +++ b/src/SBuf.h @@ -232,14 +232,14 @@ public: * * does not check access bounds. If you need that, use at() */ - const char operator [](size_type pos) const {++stats.getChar; return store_->mem[off_+pos];} + char operator [](size_type pos) const {++stats.getChar; return store_->mem[off_+pos];} /** random-access read to any char within the SBuf. * * \throw OutOfBoundsException when access is out of bounds * \note bounds is 0 <= pos < length(); caller must pay attention to signedness */ - const char at(size_type pos) const {checkAccessBounds(pos); return operator[](pos);} + char at(size_type pos) const {checkAccessBounds(pos); return operator[](pos);} /** direct-access set a byte at a specified operation. * @@ -582,7 +582,7 @@ private: * Try to guesstimate how big a MemBlob to allocate. * The result is guarranteed to be to be at least the desired size. */ - const size_type estimateCapacity(size_type desired) const {return (2*desired);} + size_type estimateCapacity(size_type desired) const {return (2*desired);} void reAlloc(size_type newsize); -- 2.47.3