Bug 6222

Summary: HashMap does not work with const pointer keys or values
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: WebKit Misc.Assignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
the fix eric: review+

Description Maciej Stachowiak 2005-12-23 17:56:14 PST
HashMap does not work for const foo * keys and values because the pointer specialization fails to cast 
away const and so fails some implicit conversions.
Comment 1 Maciej Stachowiak 2005-12-23 18:00:08 PST
Created attachment 5253 [details]
the fix
Comment 2 Eric Seidel (no email) 2005-12-24 02:42:55 PST
Comment on attachment 5253 [details]
the fix

the KDE folks have been removing c-style casts from the kxmlcore code they
imported from us.  This just gives them more to remove.

That said, this looks fine.  r=me.
Comment 3 Maciej Stachowiak 2005-12-24 14:03:52 PST
I think if you're going to const_cast and reinterpret_cast both, then you may as well just use a C-style cast.