From: Francesco Chemolli Date: Sun, 2 Feb 2014 14:36:26 +0000 (+0100) Subject: Made Vector::items private X-Git-Tag: SQUID_3_5_0_1~379^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f8747633f2411ae2f7d2e40c1ecda7531f88dc9;p=thirdparty%2Fsquid.git Made Vector::items private --- diff --git a/src/base/Vector.h b/src/base/Vector.h index 71c753890f..ae3aba74fb 100644 --- a/src/base/Vector.h +++ b/src/base/Vector.h @@ -88,7 +88,8 @@ public: typedef VectorIteratorBase > iterator; typedef VectorIteratorBase const> const_iterator; typedef ptrdiff_t difference_type; - + friend class VectorIteratorBase >; + friend class VectorIteratorBase const>; void *operator new (size_t); void operator delete (void *); @@ -119,10 +120,12 @@ public: const E& at(unsigned i) const; E& operator [] (unsigned i); const E& operator [] (unsigned i) const; + E* data() const { return items; } /* Do not change these, until the entry C struct is removed */ size_t capacity; size_t count; +protected: E *items; }; diff --git a/src/esi/CustomParser.cc b/src/esi/CustomParser.cc index 8f632ca79f..a384c668cd 100644 --- a/src/esi/CustomParser.cc +++ b/src/esi/CustomParser.cc @@ -205,7 +205,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool attribute = end + 1; } - theClient->start (tag + 1, (const char **)attributes.items, attributes.size() >> 1); + theClient->start (tag + 1, (const char **)attributes.data(), attributes.size() >> 1); /* TODO: attributes */ if (*(tagEnd - 1) == '/')