diff options
Diffstat (limited to 'Userland/Libraries/LibCore/IODevice.cpp')
-rw-r--r-- | Userland/Libraries/LibCore/IODevice.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibCore/IODevice.cpp b/Userland/Libraries/LibCore/IODevice.cpp index a0d792e85e..809a6aab58 100644 --- a/Userland/Libraries/LibCore/IODevice.cpp +++ b/Userland/Libraries/LibCore/IODevice.cpp @@ -22,7 +22,7 @@ IODevice::IODevice(Object* parent) { } -const char* IODevice::error_string() const +char const* IODevice::error_string() const { return strerror(m_error); } @@ -142,7 +142,7 @@ ByteBuffer IODevice::read_all() set_eof(true); break; } - data.append((const u8*)read_buffer, nread); + data.append((u8 const*)read_buffer, nread); } auto result = ByteBuffer::copy(data); @@ -166,7 +166,7 @@ String IODevice::read_line(size_t max_size) dbgln("IODevice::read_line: At EOF but there's more than max_size({}) buffered", max_size); return {}; } - auto line = String((const char*)m_buffered_data.data(), m_buffered_data.size(), Chomp); + auto line = String((char const*)m_buffered_data.data(), m_buffered_data.size(), Chomp); m_buffered_data.clear(); return line; } @@ -272,7 +272,7 @@ bool IODevice::truncate(off_t size) return true; } -bool IODevice::write(const u8* data, int size) +bool IODevice::write(u8 const* data, int size) { int rc = ::write(m_fd, data, size); if (rc < 0) { @@ -294,7 +294,7 @@ void IODevice::set_fd(int fd) bool IODevice::write(StringView v) { - return write((const u8*)v.characters_without_null_termination(), v.length()); + return write((u8 const*)v.characters_without_null_termination(), v.length()); } LineIterator::LineIterator(IODevice& device, bool is_end) |