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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 27 14:24:56 PDT 2011


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

           Summary: HashMap<>::add should return a more descriptive object
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: darin at apple.com, sam at webkit.org, adamk at chromium.org


HashMap<>::add returns a pair of HashMap iterator and a boolean but the semantics of this return value is totally unclear in its call sites.

We end up code like:

pair<EventListenerHashMap::iterator, bool> result = m_hashMap->add(eventType, 0);
if (result.second)
    result.first->second = new EventListenerVector;

We should create some struct for this purpose so that semantics is clearer.

-- 
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