[webkit-reviews] review granted: [Bug 215879] Add a variant of map which filters items to Vector.h : [Attachment 407450] Updated per review comments
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 28 12:45:56 PDT 2020
Darin Adler <darin at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 215879: Add a variant of map which filters items to Vector.h
https://bugs.webkit.org/show_bug.cgi?id=215879
Attachment 407450: Updated per review comments
https://bugs.webkit.org/attachment.cgi?id=407450&action=review
--- Comment #10 from Darin Adler <darin at apple.com> ---
Comment on attachment 407450
--> https://bugs.webkit.org/attachment.cgi?id=407450
Updated per review comments
View in context: https://bugs.webkit.org/attachment.cgi?id=407450&action=review
> Source/WTF/wtf/Vector.h:1741
> +template<typename MapFunction, typename SourceType>
> +Vector<typename CompactMapper<MapFunction, SourceType>::DestinationItemType>
compactMap(SourceType&& source, MapFunction&& mapFunction)
With "map" still a member function but this a free function, we are a bit
inconsistent.
> Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:885
> + auto mapped = WTF::compactMap(vector, evenMultipliedByFive);
Not sure the WTF prefix is needed here.
More information about the webkit-reviews
mailing list