New generic hash function (lang maintainers)
Milian Wolff
mail at milianw.de
Thu Mar 28 11:16:35 UTC 2013
On Tuesday 19 March 2013 07:54:57 Olivier J. G. wrote:
> I just added /language/platform/kdevhash.h to KDevPlatform. You can see how
> it's used in the various KDevplatform types' hash() function.
> It's meant to provide a generic hash so you don't have to pull numbers out
> of a hat for your hash and hope they don't clash, and should behave
> generally pretty well.
> The only only thing to beware of is that adding zero doesn't modify the
> hash value, so if you have a list of items that contribute to the hash,
> some of which may contribute a zero for whatever reason, make sure just to
> add << list.count() to the hash as well, to make sure you don't have some
> accidental clashes on items that are the same except that one has one more
> zero-contributing item than the other.
BTW: Has the kdevelop C++ lang plugin been adapted?
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130328/a1bf386a/attachment.sig>
More information about the KDevelop-devel
mailing list