mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
Kernel: Make KBuffer a value-type wrapper around a KBufferImpl
A KBuffer always contains a valid KBufferImpl. If you need a "null" state buffer, use Optional<KBuffer>. This makes KBuffer very easy to work with and pass around, just like ByteBuffer before it.
This commit is contained in:
@@ -84,7 +84,7 @@ void NetworkAdapter::did_receive(const u8* data, int length)
|
||||
m_packet_queue.append(KBuffer::copy(data, length));
|
||||
}
|
||||
|
||||
RefPtr<KBuffer> NetworkAdapter::dequeue_packet()
|
||||
Optional<KBuffer> NetworkAdapter::dequeue_packet()
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (m_packet_queue.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user