mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibCore: Make IODevice::can_read_line() const
This also makes LibHTTP's Job::can_read_line() const, as IODevice was keeping that from being const. Fixes #2219
This commit is contained in:
parent
5386508119
commit
3485613f4a
7 changed files with 15 additions and 17 deletions
|
@ -121,7 +121,7 @@ bool IODevice::can_read_from_fd() const
|
|||
return FD_ISSET(m_fd, &rfds);
|
||||
}
|
||||
|
||||
bool IODevice::can_read_line()
|
||||
bool IODevice::can_read_line() const
|
||||
{
|
||||
if (m_eof && !m_buffered_data.is_empty())
|
||||
return true;
|
||||
|
@ -206,7 +206,7 @@ ByteBuffer IODevice::read_line(size_t max_size)
|
|||
return {};
|
||||
}
|
||||
|
||||
bool IODevice::populate_read_buffer()
|
||||
bool IODevice::populate_read_buffer() const
|
||||
{
|
||||
if (m_fd < 0)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue