mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-10 10:36:30 +00:00
Kernel: Simplify process assertion checking if region is in range
Let's use the helper function for this :)
This commit is contained in:
committed by
Andreas Kling
parent
81adefef27
commit
757c14650f
@@ -348,8 +348,7 @@ Vector<Region*, 2> Process::split_region_around_range(const Region& source_regio
|
||||
|
||||
ASSERT(!remaining_ranges_after_unmap.is_empty());
|
||||
auto make_replacement_region = [&](const Range& new_range) -> Region& {
|
||||
ASSERT(new_range.base() >= old_region_range.base());
|
||||
ASSERT(new_range.end() <= old_region_range.end());
|
||||
ASSERT(old_region_range.contains(new_range));
|
||||
size_t new_range_offset_in_vmobject = source_region.offset_in_vmobject() + (new_range.base().get() - old_region_range.base().get());
|
||||
return allocate_split_region(source_region, new_range, new_range_offset_in_vmobject);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user