1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +00:00

Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
parent ad5d217e76
commit 8b1108e485
392 changed files with 978 additions and 978 deletions

View file

@ -25,7 +25,7 @@ Client::Client(int id, RefPtr<Core::TCPSocket> socket, int ptm_fd)
m_socket->on_ready_to_read = [this] { drain_socket(); };
m_ptm_notifier->on_ready_to_read = [this] { drain_pty(); };
m_parser.on_command = [this](const Command& command) { handle_command(command); };
m_parser.on_data = [this](const StringView& data) { handle_data(data); };
m_parser.on_data = [this](StringView data) { handle_data(data); };
m_parser.on_error = [this]() { handle_error(); };
send_commands({
{ CMD_WILL, SUB_SUPPRESS_GO_AHEAD },
@ -66,7 +66,7 @@ void Client::drain_pty()
send_data(StringView(buffer, (size_t)nread));
}
void Client::handle_data(const StringView& data)
void Client::handle_data(StringView data)
{
write(m_ptm_fd, data.characters_without_null_termination(), data.length());
}