1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +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:
Idan Horowitz 2022-01-12 23:57:45 +02:00 committed by Brian Gianforcaro
parent 792b8ca13c
commit 618f123463
4 changed files with 7 additions and 8 deletions

View file

@ -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;
}