mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +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
|
@ -86,7 +86,7 @@ public:
|
|||
return count;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool is_null() const { return !m_data; }
|
||||
[[nodiscard]] bool is_null() const { return m_data == nullptr; }
|
||||
|
||||
[[nodiscard]] const u8* data() const { return m_data; }
|
||||
|
||||
|
@ -279,7 +279,7 @@ public:
|
|||
size_t trailing_bits = size() % 32;
|
||||
for (size_t i = 0; i < trailing_bits; ++i) {
|
||||
if (!get(first_trailing_bit + i)) {
|
||||
if (!free_chunks)
|
||||
if (free_chunks == 0)
|
||||
*start_of_free_chunks = first_trailing_bit + i;
|
||||
if (++free_chunks >= min_length)
|
||||
return min(free_chunks, max_length);
|
||||
|
@ -313,7 +313,7 @@ public:
|
|||
}
|
||||
|
||||
found_range_size = max_region_size;
|
||||
if (max_region_size) {
|
||||
if (max_region_size != 0) {
|
||||
return max_region_start;
|
||||
}
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue