[Webkit-unassigned] [Bug 71063] HashMap<>::add should return a more descriptive object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 6 16:22:30 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=71063





--- Comment #1 from Caio Marcelo de Oliveira Filho <cmarcelo at webkit.org>  2012-01-06 16:22:30 PST ---
(In reply to comment #0)
> We end up code like:
> 
> pair<EventListenerHashMap::iterator, bool> result = m_hashMap->add(eventType, 0);
> if (result.second)
>     result.first->second = new EventListenerVector;

What about have the following?

EventListenerHashMap::AddResult result = m_hashMap->add(eventType, 0);
if (result.isNewKey)
    result.iterator->second = new EventListenerVector;

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list