Bug 141565 - Add an initializer list constructor to Deque
Summary: Add an initializer list constructor to Deque
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-13 10:20 PST by Anders Carlsson
Modified: 2015-02-13 10:46 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.93 KB, patch)
2015-02-13 10:25 PST, Anders Carlsson
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2015-02-13 10:20:38 PST
Add an initializer list constructor to Deque
Comment 1 Anders Carlsson 2015-02-13 10:25:18 PST
Created attachment 246530 [details]
Patch
Comment 2 Andreas Kling 2015-02-13 10:29:25 PST
Comment on attachment 246530 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246530&action=review

r=me

> Source/WTF/wtf/Deque.h:281
> +    for (auto& element : initializerList)
> +        append(element);

In a perfect world this would use some kind of reserveInitialCapacity() + uncheckedAppend() combo.
Comment 3 Anders Carlsson 2015-02-13 10:46:12 PST
Committed r180059: <http://trac.webkit.org/changeset/180059>