RESOLVED FIXED Bug 23974
Deque::Remove would be a useful method.
https://bugs.webkit.org/show_bug.cgi?id=23974
Summary Deque::Remove would be a useful method.
David Levin
Reported 2009-02-16 10:52:23 PST
This is simply a way to remove an item from within a deque. Although it shouldn't be the primary means of removing items from a queue, it is useful to have. (This will be used in support of a feature addition to a message queue.) Also, the implementation of copy for deque iterators is missing an implemention of WTF::DequeIteratorBase<T>::operator=.
Attachments
Patch for bug. (5.15 KB, patch)
2009-02-16 10:59 PST, David Levin
no flags
Proposed fix. (5.15 KB, patch)
2009-02-16 14:26 PST, David Levin
ap: review+
David Levin
Comment 1 2009-02-16 10:59:32 PST
Created attachment 27701 [details] Patch for bug.
David Levin
Comment 2 2009-02-16 14:26:22 PST
Created attachment 27709 [details] Proposed fix. Remove one extra blank line from last patch.
Alexey Proskuryakov
Comment 3 2009-02-18 11:06:48 PST
Comment on attachment 27709 [details] Proposed fix. > + Add Deque::remove and Deque*Iterator::copy. As discussed on IRC, it's quite unclear why DequeIteratorBase<T>::operator= was added, an explanation in ChangeLog would help a lot. Concrete iterators assignment operators were calling Base::assign(), which in turn called this unimplemented operator=. We could only get away with that because all this code was unused. Other containers' remove() methods have an early return for end(), so Deque::remove should have it, too. r=me, with this bug fixed, and a better ChangeLog.
David Levin
Comment 4 2009-02-18 16:30:03 PST
Committed as r41068.
Note You need to log in before you can comment on or make changes to this bug.