1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

Kernel: Add bitwise operators for Thread::FileBlocker::BlockFlags enum

Switch to using type-safe bitwise operators for the BlockFlags class,
this cleans up a lot of boilerplate casts which are necessary when the
enum is declared as `enum class`.
This commit is contained in:
Brian Gianforcaro 2021-03-07 03:01:11 -08:00 committed by Andreas Kling
parent eaef57443c
commit 5f6ab77352
7 changed files with 57 additions and 47 deletions

View file

@ -26,6 +26,7 @@
#pragma once
#include <AK/EnumBits.h>
#include <AK/Function.h>
#include <AK/HashMap.h>
#include <AK/IntrusiveList.h>
@ -1267,6 +1268,8 @@ private:
void drop_thread_count(bool);
};
AK_ENUM_BITWISE_OPERATORS(Thread::FileBlocker::BlockFlags);
template<typename Callback>
inline IterationDecision Thread::for_each(Callback callback)
{