diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-07 15:58:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-07 15:58:18 +0200 |
commit | 16cd86b8455363fd393c0be68d76c2ae19eb3f10 (patch) | |
tree | 9307fc0cb0345d4c744f226881c177fe7ad15ed6 /Kernel/KBuffer.h | |
parent | 300402cc142aaa4e481801146b47b1d0f72c0647 (diff) | |
download | serenity-16cd86b8455363fd393c0be68d76c2ae19eb3f10.zip |
Kernel: Remove some unused KBuffer functions
Diffstat (limited to 'Kernel/KBuffer.h')
-rw-r--r-- | Kernel/KBuffer.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Kernel/KBuffer.h b/Kernel/KBuffer.h index b8a1664ef5..a2b8ffe777 100644 --- a/Kernel/KBuffer.h +++ b/Kernel/KBuffer.h @@ -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; }; |