mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Userland: Replace VERIFY(is<T>) with verify_cast<T>
Instead of doing a VERIFY(is<T>(x)) and *then* casting it to T, we can just do the cast right away with verify_cast<T>. :^)
This commit is contained in:
parent
7fef8c5648
commit
e59bf87374
10 changed files with 26 additions and 43 deletions
|
@ -61,8 +61,7 @@ void SoftMMU::ensure_split_at(X86::LogicalAddress address)
|
|||
|
||||
// If we get here, we know that the page exists and belongs to a region, that there is
|
||||
// a previous page, and that it belongs to the same region.
|
||||
VERIFY(is<MmapRegion>(m_page_to_region_map[page_index]));
|
||||
auto* old_region = static_cast<MmapRegion*>(m_page_to_region_map[page_index]);
|
||||
auto* old_region = verify_cast<MmapRegion>(m_page_to_region_map[page_index]);
|
||||
|
||||
//dbgln("splitting at {:p}", address.offset());
|
||||
//dbgln(" old region: {:p}-{:p}", old_region->base(), old_region->end() - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue