mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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
Notes:
sideshowbarker
2024-07-17 23:11:18 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/9b90f1fed5a Pull-request: https://github.com/SerenityOS/serenity/pull/11164
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…
Reference in a new issue