RESOLVED FIXED 125551
Add a HashMap constructor that takes an initializer list
https://bugs.webkit.org/show_bug.cgi?id=125551
Summary Add a HashMap constructor that takes an initializer list
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.