[squid-dev] [PATCH] coverity-fixes, part 2: SBuf hasher

Kinkie gkinkie at gmail.com
Thu Aug 27 15:51:56 UTC 2015


Hi,
  the attached patch implements this suggestion renaming to SBufHashCommon_
(it seems to be a common pattern) and adding a comment.

On Mon, Aug 24, 2015 at 8:51 PM, Alex Rousskov <
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150827/b5c3c10d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coverity-fixes-sbufhasher-common-rename.patch
Type: application/octet-stream
Size: 1337 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150827/b5c3c10d/attachment.obj>


More information about the squid-dev mailing list