1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

Kernel: Remove some unnecessary casts to uintptr_t

VirtualAddress is constructible from uintptr_t and const void*.
PhysicalAddress is constructible from uintptr_t but not const void*.
This commit is contained in:
Andreas Kling 2020-01-20 13:06:41 +01:00
parent a246e9cd7e
commit 4b7a89911c
7 changed files with 41 additions and 31 deletions

View file

@ -45,7 +45,7 @@ AnonymousVMObject::AnonymousVMObject(size_t size)
AnonymousVMObject::AnonymousVMObject(PhysicalAddress paddr, size_t size)
: VMObject(size)
{
ASSERT(paddr.page_base() == paddr.get());
ASSERT(paddr.page_base() == paddr);
for (size_t i = 0; i < page_count(); ++i)
physical_pages()[i] = PhysicalPage::create(paddr.offset(i * PAGE_SIZE), false, false);
}