mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +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
4 changed files with 7 additions and 8 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <Kernel/PhysicalAddress.h>
|
||||
#include <Kernel/UserOrKernelBuffer.h>
|
||||
|
||||
|
@ -14,7 +13,7 @@ namespace Kernel::Memory {
|
|||
|
||||
class RingBuffer {
|
||||
public:
|
||||
RingBuffer(String region_name, size_t capacity);
|
||||
RingBuffer(StringView region_name, size_t capacity);
|
||||
|
||||
bool has_space() const { return m_num_used_bytes < m_capacity_in_bytes; }
|
||||
bool copy_data_in(const UserOrKernelBuffer& buffer, size_t offset, size_t length, PhysicalAddress& start_of_copied_data, size_t& bytes_copied);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue