mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 05:09:01 +00:00
AK: Resolve clang-tidy readability-bool-conversion warnings
... In files included by Kernel/Process.cpp and Kernel/Thread.cpp
This commit is contained in:
parent
10d0cac73c
commit
22feb9d47b
Notes:
sideshowbarker
2024-07-18 01:08:10 +09:00
Author: https://github.com/ADKaster
Commit: 22feb9d47b
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
12 changed files with 26 additions and 25 deletions
|
@ -20,7 +20,6 @@ class Userspace {
|
|||
public:
|
||||
Userspace() = default;
|
||||
|
||||
operator bool() const { return m_ptr; }
|
||||
operator FlatPtr() const { return (FlatPtr)m_ptr; }
|
||||
|
||||
// Disable default implementations that would use surprising integer promotion.
|
||||
|
@ -36,6 +35,8 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
explicit operator bool() const { return m_ptr != 0; }
|
||||
|
||||
FlatPtr ptr() const { return m_ptr; }
|
||||
T unsafe_userspace_ptr() const { return (T)m_ptr; }
|
||||
#else
|
||||
|
@ -44,6 +45,8 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
explicit operator bool() const { return m_ptr != nullptr; }
|
||||
|
||||
T ptr() const { return m_ptr; }
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue