Bug 190796

Summary: Deque's contains() and findIf() should be const
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, benjamin, cmarcelo, commit-queue, dbates, ews-watchlist, ggaren, koivisto, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2018-10-22 09:39:02 PDT
Deque's contains() and findIf() should be const as they do not modify the container.
Attachments
Patch (5.61 KB, patch)
2018-10-22 10:10 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-10-22 10:10:54 PDT
Antti Koivisto
Comment 2 2018-10-22 11:31:41 PDT
Comment on attachment 352895 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352895&action=review > Source/WTF/wtf/Deque.h:407 > + return std::find_if(begin(), end(), predicate); Considering how few clients this stuff has, maybe they could just do this themselves.
Chris Dumez
Comment 3 2018-10-22 11:40:03 PDT
Comment on attachment 352895 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352895&action=review >> Source/WTF/wtf/Deque.h:407 >> + return std::find_if(begin(), end(), predicate); > > Considering how few clients this stuff has, maybe they could just do this themselves. I considered that but I personally do not like the std::algorithm functions as they are too verbose. I like that our container types have their own less verbose convenience methods.
WebKit Commit Bot
Comment 4 2018-10-22 14:05:09 PDT
Comment on attachment 352895 [details] Patch Clearing flags on attachment: 352895 Committed r237329: <https://trac.webkit.org/changeset/237329>
WebKit Commit Bot
Comment 5 2018-10-22 14:05:11 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-10-22 14:06:33 PDT
Note You need to log in before you can comment on or make changes to this bug.