mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
Kernel: Do not do integer to pointer conversion in constexpr functions
Creating pointers from arbitrary values is not a valid thing to do in constexpr functions. Furthermore, this functions is always called with runtime values anyways, so there's no use in having it be constexpr. Instead, make it ALWAYS_INLINE.
This commit is contained in:
parent
8e2d0c8d5c
commit
9b90f1fed5
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ constexpr u32 INNER_SHAREABLE = (3 << 8);
|
|||
constexpr u32 NORMAL_MEMORY = (0 << 2);
|
||||
constexpr u32 DEVICE_MEMORY = (1 << 2);
|
||||
|
||||
constexpr u64* descriptor_to_pointer(FlatPtr descriptor)
|
||||
ALWAYS_INLINE static u64* descriptor_to_pointer(FlatPtr descriptor)
|
||||
{
|
||||
return (u64*)(descriptor & DESCRIPTOR_MASK);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue