mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 12:49:05 +00:00
Kernel: Resolve clang-tidy readability-implicit-bool-conversion warnings
... In files included from Kernel/Process.cpp and Kernel/Thread.cpp
This commit is contained in:
parent
6f580f2047
commit
a92132e44a
Notes:
sideshowbarker
2024-07-18 01:07:25 +09:00
Author: https://github.com/ADKaster
Commit: a92132e44a
Pull-request: https://github.com/SerenityOS/serenity/pull/10737
Reviewed-by: https://github.com/BenWiederhake
Reviewed-by: https://github.com/PeterBindels-TomTom
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/dascandy
Reviewed-by: https://github.com/trflynn89
17 changed files with 85 additions and 84 deletions
|
@ -39,28 +39,28 @@ public:
|
|||
NoExecute = 0x8000000000000000ULL,
|
||||
};
|
||||
|
||||
bool is_present() const { return raw() & Present; }
|
||||
bool is_present() const { return (raw() & Present) == Present; }
|
||||
void set_present(bool b) { set_bit(Present, b); }
|
||||
|
||||
bool is_user_allowed() const { return raw() & UserSupervisor; }
|
||||
bool is_user_allowed() const { return (raw() & UserSupervisor) == UserSupervisor; }
|
||||
void set_user_allowed(bool b) { set_bit(UserSupervisor, b); }
|
||||
|
||||
bool is_huge() const { return raw() & Huge; }
|
||||
bool is_huge() const { return (raw() & Huge) == Huge; }
|
||||
void set_huge(bool b) { set_bit(Huge, b); }
|
||||
|
||||
bool is_writable() const { return raw() & ReadWrite; }
|
||||
bool is_writable() const { return (raw() & ReadWrite) == ReadWrite; }
|
||||
void set_writable(bool b) { set_bit(ReadWrite, b); }
|
||||
|
||||
bool is_write_through() const { return raw() & WriteThrough; }
|
||||
bool is_write_through() const { return (raw() & WriteThrough) == WriteThrough; }
|
||||
void set_write_through(bool b) { set_bit(WriteThrough, b); }
|
||||
|
||||
bool is_cache_disabled() const { return raw() & CacheDisabled; }
|
||||
bool is_cache_disabled() const { return (raw() & CacheDisabled) == CacheDisabled; }
|
||||
void set_cache_disabled(bool b) { set_bit(CacheDisabled, b); }
|
||||
|
||||
bool is_global() const { return raw() & Global; }
|
||||
bool is_global() const { return (raw() & Global) == Global; }
|
||||
void set_global(bool b) { set_bit(Global, b); }
|
||||
|
||||
bool is_execute_disabled() const { return raw() & NoExecute; }
|
||||
bool is_execute_disabled() const { return (raw() & NoExecute) == NoExecute; }
|
||||
void set_execute_disabled(bool b) { set_bit(NoExecute, b); }
|
||||
|
||||
void set_bit(u64 bit, bool value)
|
||||
|
@ -96,25 +96,25 @@ public:
|
|||
NoExecute = 0x8000000000000000ULL,
|
||||
};
|
||||
|
||||
bool is_present() const { return raw() & Present; }
|
||||
bool is_present() const { return (raw() & Present) == Present; }
|
||||
void set_present(bool b) { set_bit(Present, b); }
|
||||
|
||||
bool is_user_allowed() const { return raw() & UserSupervisor; }
|
||||
bool is_user_allowed() const { return (raw() & UserSupervisor) == UserSupervisor; }
|
||||
void set_user_allowed(bool b) { set_bit(UserSupervisor, b); }
|
||||
|
||||
bool is_writable() const { return raw() & ReadWrite; }
|
||||
bool is_writable() const { return (raw() & ReadWrite) == ReadWrite; }
|
||||
void set_writable(bool b) { set_bit(ReadWrite, b); }
|
||||
|
||||
bool is_write_through() const { return raw() & WriteThrough; }
|
||||
bool is_write_through() const { return (raw() & WriteThrough) == WriteThrough; }
|
||||
void set_write_through(bool b) { set_bit(WriteThrough, b); }
|
||||
|
||||
bool is_cache_disabled() const { return raw() & CacheDisabled; }
|
||||
bool is_cache_disabled() const { return (raw() & CacheDisabled) == CacheDisabled; }
|
||||
void set_cache_disabled(bool b) { set_bit(CacheDisabled, b); }
|
||||
|
||||
bool is_global() const { return raw() & Global; }
|
||||
bool is_global() const { return (raw() & Global) == Global; }
|
||||
void set_global(bool b) { set_bit(Global, b); }
|
||||
|
||||
bool is_execute_disabled() const { return raw() & NoExecute; }
|
||||
bool is_execute_disabled() const { return (raw() & NoExecute) == NoExecute; }
|
||||
void set_execute_disabled(bool b) { set_bit(NoExecute, b); }
|
||||
|
||||
bool is_null() const { return m_raw == 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue