From: Francesco Chemolli Date: Wed, 4 Feb 2009 22:39:55 +0000 (+0100) Subject: Fixed some compilation problems caught by Tsantilas Christos. X-Git-Tag: SQUID_3_2_0_1~1212^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ce0e99b0b3f3d7035ccde2b834afdfca0365359;p=thirdparty%2Fsquid.git Fixed some compilation problems caught by Tsantilas Christos. --- diff --git a/src/SquidString.h b/src/SquidString.h index d97f37b83c..c05c98f4d5 100644 --- a/src/SquidString.h +++ b/src/SquidString.h @@ -95,7 +95,7 @@ public: * Retrieve a single character in the string. \param pos Position of character to retrieve. */ - _SQUID_INLINE_ char operator [](unsigned int pos); + _SQUID_INLINE_ char operator [](unsigned int pos) const; _SQUID_INLINE_ int size() const; _SQUID_INLINE_ char const * unsafeBuf() const; diff --git a/src/String.cci b/src/String.cci index e6f02fc568..bd97323d99 100644 --- a/src/String.cci +++ b/src/String.cci @@ -77,7 +77,7 @@ String::termedBuf() const } char -String::operator [](unsigned int pos) +String::operator [](unsigned int pos) const { assert(pos < size_); diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 21184c43e9..e49ed3ddba 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1400,13 +1400,13 @@ ClientHttpRequest::noteMoreBodyDataAvailable(BodyPipe::Pointer) assert(request_satisfaction_mode); assert(adaptedBodySource != NULL); - if (const size_t contentSize = adaptedBodySource->unsafeBuf().contentSize()) { + if (const size_t contentSize = adaptedBodySource->buf().contentSize()) { BodyPipeCheckout bpc(*adaptedBodySource); - const StoreIOBuffer ioBuf(&bpc.unsafeBuf, request_satisfaction_offset); + const StoreIOBuffer ioBuf(&bpc.buf, request_satisfaction_offset); storeEntry()->write(ioBuf); // assume can write everything request_satisfaction_offset += contentSize; - bpc.unsafeBuf.consume(contentSize); + bpc.buf.consume(contentSize); bpc.checkIn(); }