AK: Use explode_byte
in BumpAllocator.h
When compiling this code with Clang, both branches of the ternary operator get evaluated at compile-time, triggering a warning about a narrowing implicit conversion. We can use `explode_byte` instead.
This commit is contained in:
parent
3a8b8d8a0b
commit
301cab188c
Notes:
sideshowbarker
2024-07-18 07:15:53 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/301cab188cf Pull-request: https://github.com/SerenityOS/serenity/pull/8718 Issue: https://github.com/SerenityOS/serenity/issues/363 Reviewed-by: https://github.com/gunnarbeutner ✅ Reviewed-by: https://github.com/nico
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ protected:
|
|||
return true;
|
||||
}
|
||||
|
||||
constexpr static FlatPtr chunk_magic = sizeof(FlatPtr) == sizeof(u32) ? 0xdfdfdfdfu : 0xdfdfdfdfdfdfdfdfull;
|
||||
constexpr static FlatPtr chunk_magic = explode_byte(0xdf);
|
||||
struct ChunkHeader {
|
||||
FlatPtr magic;
|
||||
FlatPtr next_chunk;
|
||||
|
|
Loading…
Add table
Reference in a new issue