mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
Kernel: Remove KBuffer::try_copy() in favor of try_create_with_bytes()
These were already equivalent, so let's only have one of them.
This commit is contained in:
parent
8ded4ad88c
commit
a01b19c878
3 changed files with 2 additions and 7 deletions
|
@ -37,11 +37,6 @@ public:
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static KResultOr<NonnullOwnPtr<KBuffer>> try_copy(const void* data, size_t size, Memory::Region::Access access = Memory::Region::Access::ReadWrite, StringView name = "KBuffer")
|
||||
{
|
||||
return try_create_with_bytes(ReadonlyBytes { data, size }, access, name);
|
||||
}
|
||||
|
||||
[[nodiscard]] u8* data() { return m_region->vaddr().as_ptr(); }
|
||||
[[nodiscard]] u8 const* data() const { return m_region->vaddr().as_ptr(); }
|
||||
[[nodiscard]] size_t size() const { return m_size; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue