mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
AK+Kernel: Implement and use EnumBits has_any_flag()
This duplicates the old functionality of has_flag and will return true when any flags present in the mask are also in the value.
This commit is contained in:
parent
371911b1b5
commit
9715311837
Notes:
sideshowbarker
2024-07-18 08:56:48 +09:00
Author: https://github.com/timmot
Commit: 9715311837
Pull-request: https://github.com/SerenityOS/serenity/pull/8724
Reviewed-by: https://github.com/bgianfo ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
3 changed files with 9 additions and 3 deletions
|
@ -96,7 +96,7 @@ Thread::FileBlocker::BlockFlags FileDescription::should_unblock(Thread::FileBloc
|
|||
unblock_flags |= BlockFlags::Write;
|
||||
// TODO: Implement Thread::FileBlocker::BlockFlags::Exception
|
||||
|
||||
if (has_flag(block_flags, BlockFlags::SocketFlags)) {
|
||||
if (has_any_flag(block_flags, BlockFlags::SocketFlags)) {
|
||||
auto* sock = socket();
|
||||
VERIFY(sock);
|
||||
if (has_flag(block_flags, BlockFlags::Accept) && sock->can_accept())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue