mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Kernel: Use range-for with InlineLinkedList
This commit is contained in:
@@ -110,12 +110,12 @@ void VMObject::for_each_region(Callback callback)
|
||||
{
|
||||
// FIXME: Figure out a better data structure so we don't have to walk every single region every time an inode changes.
|
||||
// Perhaps VMObject could have a Vector<Region*> with all of his mappers?
|
||||
for (auto* region = MM.m_user_regions.head(); region; region = region->next()) {
|
||||
if (®ion->vmo() == this)
|
||||
callback(*region);
|
||||
for (auto& region : MM.m_user_regions) {
|
||||
if (®ion.vmo() == this)
|
||||
callback(region);
|
||||
}
|
||||
for (auto* region = MM.m_kernel_regions.head(); region; region = region->next()) {
|
||||
if (®ion->vmo() == this)
|
||||
callback(*region);
|
||||
for (auto& region : MM.m_kernel_regions) {
|
||||
if (®ion.vmo() == this)
|
||||
callback(region);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user