mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 02:33:03 +00:00
AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)
Use this instead of uintptr_t throughout the codebase. This makes it possible to pass a FlatPtr to something that has u32 and u64 overloads.
This commit is contained in:
parent
b98d8ad5b0
commit
b1058b33fb
Notes:
sideshowbarker
2024-07-19 08:50:35 +09:00
Author: https://github.com/awesomekling
Commit: b1058b33fb
36 changed files with 164 additions and 161 deletions
|
@ -105,9 +105,9 @@ void PhysicalRegion::return_page_at(PhysicalAddress addr)
|
|||
|
||||
ptrdiff_t local_offset = addr.get() - m_lower.get();
|
||||
ASSERT(local_offset >= 0);
|
||||
ASSERT((uintptr_t)local_offset < (uintptr_t)(m_pages * PAGE_SIZE));
|
||||
ASSERT((FlatPtr)local_offset < (FlatPtr)(m_pages * PAGE_SIZE));
|
||||
|
||||
auto page = (uintptr_t)local_offset / PAGE_SIZE;
|
||||
auto page = (FlatPtr)local_offset / PAGE_SIZE;
|
||||
if (page < m_last)
|
||||
m_last = page;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue