2009/2/4 Paweł Hajdan Jr. <phajdan...@chromium.org>: > I recently tried to port chrome/browser/safe_browsing/protocol_manager.cc to > Linux, but there's one problem. ProtocolManager uses hash_map of > URLFetcher*-s, and GCC needs a hash function for it. > > I see many ways we can deal with that, and I discussed some of them on irc > and in review. The result so far is that it would be better to discuss this > further on chromium-dev. So, what we could do: > > 1) Just implement needed hash function for gcc in URLFetcher's header file. > Works, but then it has to be done in every place where it's needed, and we > have at least one case of that, for example profile.h. > 2) Provide default identity hash function for object pointers (it's probably > what MSVC does on Windows). You can see a patch here: > http://codereview.chromium.org/20041 . There are concerns about making this > a default behavior, so... > 3) Maybe create a macro like GCC_IDENTITY_HASH(ClassName) so we don't have > to repeat the implementation of identity hash function. Then it's simple to > apply it explicitly only where it's needed. But well, it's a macro. > > Generally each of these choices have some drawbacks, but probably they're > not the only ways to deal with this problem. > > So, if you have any ideas, comments, etc. - please share.
I am not familiar with this API, but in general, I think we should just use std::map instead. Maybe a safe browsing expert can comment about this. If we have less than a few hundred or so it doesn't matter. Brett --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---