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

Kernel: Fix weird Region constructor that took nullable RefPtr<Inode>

It's never valid to construct a Region with a null Inode pointer using
this constructor, so just take a NonnullRefPtr<Inode> instead.
This commit is contained in:
Andreas Kling 2019-11-04 00:21:08 +01:00
parent 9b2dc36229
commit e3dda4e87b
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ Region::Region(const Range& range, const String& name, u8 access)
MM.register_region(*this);
}
Region::Region(const Range& range, RefPtr<Inode>&& inode, const String& name, u8 access)
Region::Region(const Range& range, NonnullRefPtr<Inode> inode, const String& name, u8 access)
: m_range(range)
, m_vmobject(InodeVMObject::create_with_inode(*inode))
, m_name(name)