Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4c450a7daaf8c2acf3935116f63147049729ab8b
https://github.com/WebKit/WebKit/commit/4c450a7daaf8c2acf3935116f63147049729ab8b
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M Source/WTF/wtf/EnumSet.h
M Source/WTF/wtf/SmallSet.h
Log Message:
-----------
[WTF] Use std::has_single_bit() instead of open-coded single-bit checks in
EnumSet and SmallSet
https://bugs.webkit.org/show_bug.cgi?id=319160
rdar://181980648
Reviewed by Chris Dumez.
Replace open-coded `!(x & (x - 1))` power-of-two/single-bit checks with
std::has_single_bit(), matching the sibling OptionSet::hasExactlyOneBitSet().
* Source/WTF/wtf/EnumSet.h:
(WTF::EnumSet::hasExactlyOneBitSet const):
* Source/WTF/wtf/SmallSet.h:
Canonical link: https://commits.webkit.org/317052@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications