[squid-dev] [PATCH] coverity-fixes, part 2: SBuf hasher
Alex Rousskov
rousskov at measurement-factory.com
Thu Aug 27 19:30:35 UTC 2015
On 08/27/2015 09:51 AM, Kinkie wrote:
> Hi,
> the attached patch implements this suggestion renaming to
> SBufHashCommon_ (it seems to be a common pattern) and adding a comment.
Thank you for changing this. This editorial change did not require a new
review round IMHO.
Alex.
> On Mon, Aug 24, 2015 at 8:51 PM, Alex Rousskov
> <rousskov at measurement-factory.com
> <mailto:rousskov at measurement-factory.com>> wrote:
>
> On 08/24/2015 11:13 AM, Kinkie wrote:
> > this is part 2 of the coverity-fixes merge: SBuf hash.
> > This code allows to have std::unordered_maps where the key is a SBuf, in
> > case-sensitive and case-insensitive variants. The hashing is the same as
> > used in the current Squid hash implementation (from lib/hash.cc) in
> > order not to upset the current uses. More specific algorithms can be
> > implemented by future users if they wish to.
>
>
> > +lowSBufHash (const SBuf & sbuf, bool caseInsensitive = false)
> noexcept
>
> I recommend using trailing underscore to mark low-level, "private" code
> instead of "low" which may be confused with lower-case-related method,
> especially in an SBuf context. Not important.
>
> Alex.
>
>
>
>
> --
> Francesco
>
>
> _______________________________________________
> squid-dev mailing list
> squid-dev at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-dev
>
More information about the squid-dev
mailing list