mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 23:56:06 +00:00
Kernel: Use StringView instead of String in RingBuffer's constructor
This String was being copied into a KString internally anyways.
This commit is contained in:
parent
792b8ca13c
commit
618f123463
Notes:
sideshowbarker
2024-07-17 21:01:21 +09:00
Author: https://github.com/IdanHo
Commit: 618f123463
Pull-request: https://github.com/SerenityOS/serenity/pull/11848
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/bgianfo ✅
4 changed files with 7 additions and 8 deletions
|
@ -17,8 +17,8 @@ ConsolePort::ConsolePort(unsigned port, VirtIO::Console& console)
|
|||
, m_console(console)
|
||||
, m_port(port)
|
||||
{
|
||||
m_receive_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Receive", RINGBUFFER_SIZE);
|
||||
m_transmit_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Transmit", RINGBUFFER_SIZE);
|
||||
m_receive_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Receive"sv, RINGBUFFER_SIZE);
|
||||
m_transmit_buffer = make<Memory::RingBuffer>("VirtIO::ConsolePort Transmit"sv, RINGBUFFER_SIZE);
|
||||
m_receive_queue = m_port == 0 ? 0 : m_port * 2 + 2;
|
||||
m_transmit_queue = m_port == 0 ? 1 : m_port * 2 + 3;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue