summaryrefslogtreecommitdiff
path: root/Libraries/LibCore/IODevice.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-05-15 10:45:09 +0430
committerAndreas Kling <kling@serenityos.org>2020-05-15 09:50:48 +0200
commit3485613f4ad2e766378c6a503879d04a8884bf89 (patch)
tree022ff50666ba302c974496591ce2500c4df7a21d /Libraries/LibCore/IODevice.cpp
parent5386508119e5f4d9837e1015a4a3f819da7082a7 (diff)
downloadserenity-3485613f4ad2e766378c6a503879d04a8884bf89.zip
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
Diffstat (limited to 'Libraries/LibCore/IODevice.cpp')
-rw-r--r--Libraries/LibCore/IODevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibCore/IODevice.cpp b/Libraries/LibCore/IODevice.cpp
index 3ee2ea0317..df69d3b182 100644
--- a/Libraries/LibCore/IODevice.cpp
+++ b/Libraries/LibCore/IODevice.cpp
@@ -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;