mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
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.
This commit is contained in:
parent
11f88a78ad
commit
9bd68b189e
1 changed files with 1 additions and 1 deletions
|
@ -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); }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue