Bug 125551

Summary: Add a HashMap constructor that takes an initializer list
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Anders Carlsson
Reported 2013-12-10 16:58:30 PST
Add a HashMap constructor that takes an initializer list
Attachments
Patch (2.87 KB, patch)
2013-12-10 17:01 PST, Anders Carlsson
mitz: review+
Anders Carlsson
Comment 1 2013-12-10 17:01:47 PST
Anders Carlsson
Comment 2 2013-12-10 17:05:28 PST
Darin Adler
Comment 3 2013-12-12 00:04:36 PST
Comment on attachment 218925 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218925&action=review > Source/WTF/wtf/HashMap.h:79 > + HashMap(std::initializer_list<KeyValuePairType> initializerList) > + { > + for (const auto& keyValuePair : initializerList) > + add(keyValuePair.key, keyValuePair.value); > + } Can we do better efficiency-wise?
Note You need to log in before you can comment on or make changes to this bug.