mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
@@ -186,7 +186,7 @@ void LocalSocket::detach(FileDescription& description)
|
||||
}
|
||||
}
|
||||
|
||||
bool LocalSocket::can_read(FileDescription& description) const
|
||||
bool LocalSocket::can_read(const FileDescription& description) const
|
||||
{
|
||||
auto role = this->role(description);
|
||||
if (role == Role::Listener)
|
||||
@@ -208,7 +208,7 @@ bool LocalSocket::has_attached_peer(const FileDescription& description) const
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
bool LocalSocket::can_write(FileDescription& description) const
|
||||
bool LocalSocket::can_write(const FileDescription& description) const
|
||||
{
|
||||
auto role = this->role(description);
|
||||
if (role == Role::Accepted)
|
||||
|
||||
Reference in New Issue
Block a user