[webkit-changes] [WebKit/WebKit] 5e4251: Add set algebraic functions to HashSet

Sam Weinig noreply at github.com
Thu Dec 8 09:14:16 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e42510363919dd0f4ed7fec7fb23539ad9fe124
      https://github.com/WebKit/WebKit/commit/5e42510363919dd0f4ed7fec7fb23539ad9fe124
  Author: Sam Weinig <weinig at apple.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M Source/WTF/wtf/HashSet.h
    M Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp

  Log Message:
  -----------
  Add set algebraic functions to HashSet
https://bugs.webkit.org/show_bug.cgi?id=248881
rdar://103074259

Reviewed by Darin Adler.

Adds union, intersection and symmetric difference operations to
HashSet both as in-place mutating operations (the ones with the
`form` prefix) and new set creating operations (the ones with
the `With` suffix).

* Source/WTF/wtf/HashSet.h:
(WTF::W>::unionWith const):
(WTF::W>::intersectionWith const):
(WTF::W>::symmetricDifferenceWith const):
(WTF::W>::formUnion):
(WTF::W>::formIntersection):
(WTF::W>::formSymmetricDifference):
* Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/257569@main




More information about the webkit-changes mailing list