mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Kernel: Make File's can_read/can_write take a const FileDescription&
Asking a File if we could possibly read or write it will never mutate the asking FileDescription&, so it should be const.
This commit is contained in:
@@ -18,12 +18,12 @@ InodeWatcher::~InodeWatcher()
|
||||
safe_inode->unregister_watcher({}, *this);
|
||||
}
|
||||
|
||||
bool InodeWatcher::can_read(FileDescription&) const
|
||||
bool InodeWatcher::can_read(const FileDescription&) const
|
||||
{
|
||||
return !m_queue.is_empty() || !m_inode;
|
||||
}
|
||||
|
||||
bool InodeWatcher::can_write(FileDescription&) const
|
||||
bool InodeWatcher::can_write(const FileDescription&) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user