mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Kernel: Remove some unused KBuffer functions
This commit is contained in:
parent
300402cc14
commit
16cd86b845
Notes:
sideshowbarker
2024-07-18 04:31:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/16cd86b8455
1 changed files with 3 additions and 9 deletions
|
@ -89,11 +89,6 @@ private:
|
|||
|
||||
class [[nodiscard]] KBuffer {
|
||||
public:
|
||||
explicit KBuffer(RefPtr<KBufferImpl>&& impl)
|
||||
: m_impl(move(impl))
|
||||
{
|
||||
}
|
||||
|
||||
static KResultOr<NonnullOwnPtr<KBuffer>> try_create_with_size(size_t size, Memory::Region::Access access = Memory::Region::Access::ReadWrite, StringView name = "KBuffer", AllocationStrategy strategy = AllocationStrategy::Reserve)
|
||||
{
|
||||
auto impl = KBufferImpl::try_create_with_size(size, access, name, strategy);
|
||||
|
@ -132,14 +127,13 @@ public:
|
|||
|
||||
[[nodiscard]] KBufferImpl& impl() { return *m_impl; }
|
||||
[[nodiscard]] const KBufferImpl& impl() const { return *m_impl; }
|
||||
[[nodiscard]] RefPtr<KBufferImpl> take_impl() { return move(m_impl); }
|
||||
|
||||
KBuffer(const ByteBuffer& buffer, Memory::Region::Access access = Memory::Region::Access::ReadWrite, StringView name = "KBuffer")
|
||||
: m_impl(KBufferImpl::copy(buffer.data(), buffer.size(), access, name))
|
||||
private:
|
||||
explicit KBuffer(RefPtr<KBufferImpl>&& impl)
|
||||
: m_impl(move(impl))
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<KBufferImpl> m_impl;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue