LibWebSocket: Remove meaningless const&& Message constructor

This results in an ambiguity error in an upcoming commit.
This commit is contained in:
Timothy Flynn 2025-03-08 12:10:27 -05:00 committed by Tim Flynn
parent 5f76324af5
commit 8f6169859d
Notes: github-actions[bot] 2025-03-09 15:15:36 +00:00
2 changed files with 3 additions and 9 deletions

View file

@ -20,13 +20,7 @@ public:
{
}
explicit Message(ByteBuffer data, bool is_text)
: m_is_text(is_text)
, m_data(move(data))
{
}
explicit Message(ByteBuffer const&& data, bool is_text)
Message(ByteBuffer data, bool is_text)
: m_is_text(is_text)
, m_data(move(data))
{

View file

@ -525,11 +525,11 @@ void WebSocket::read_frame()
m_fragmented_data_buffer.clear();
}
if (op_code == WebSocket::OpCode::Text) {
notify_message(Message(payload, true));
notify_message(Message(move(payload), true));
return;
}
if (op_code == WebSocket::OpCode::Binary) {
notify_message(Message(payload, false));
notify_message(Message(move(payload), false));
return;
}
dbgln("Websocket: Found unknown opcode {}", (u8)op_code);