diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-24 18:31:45 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-24 18:33:22 +0200 |
commit | 9bd68b189ee72564b20f501d0dc9d3c904c035fa (patch) | |
tree | ce42a703d165a9638413ad488bcdaa4a10f25724 /Kernel/KBuffer.h | |
parent | 11f88a78adf4166993eb0c6d08c23b7c2fbcbd24 (diff) | |
download | serenity-9bd68b189ee72564b20f501d0dc9d3c904c035fa.zip |
KBuffer: capacity() should return internal capacity, not internal size
KBuffer is just meant to be a dumb wrapper around KBufferImpl.
With this change, we actually start to see KBuffers with different size
and capacity, which allows some reallocation-avoiding optimizations.
Diffstat (limited to 'Kernel/KBuffer.h')
-rw-r--r-- | Kernel/KBuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/KBuffer.h b/Kernel/KBuffer.h index 70e56ce3c4..bae0de3483 100644 --- a/Kernel/KBuffer.h +++ b/Kernel/KBuffer.h @@ -68,7 +68,7 @@ public: u8* data() { return m_impl->data(); } const u8* data() const { return m_impl->data(); } size_t size() const { return m_impl->size(); } - size_t capacity() const { return m_impl->size(); } + size_t capacity() const { return m_impl->capacity(); } void set_size(size_t size) { m_impl->set_size(size); } |