[haiku-development] Re: BPrivate::HashSet GetHashCode() => HasValue()

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 21 Jan 2015 15:53:21 -0500

Axel Dörfler wrote:
Am 20.01.2015 um 19:33 schrieb John Scipione:
Would it be amenable to change the BPrivate::HashSet (and
BPrivate::HashMap) to call HashValue() instead of GetHashCode() assuming
they are suppose to do the same thing so that we can use unmodified
BString keys?

IIRC both implementations are very old code that got imported into Haiku because of net_fs. I'm unsure if I prefer hash value over hash code, but other than that, to get compatible with our API you would have to get rid of the "Get" anyway.

I guess the only reason not to change it, is that those two classes don't have much of a future within Haiku as they are. IIRC they replicate STL semantics which are rather ugly.

Sorry to rehash an old discussion. Is there a better HashMap/HashSet 
implementation to use somewhere? I could use std::set but I'd rather not, I was 
looking for a HashMap/HashSet that fits into the BeAPI better and I stumbled 
across this code. It would be even nicer if we had something publicly available 
to use in the Support Kit.

Other related posts: