m_buffer is reference

This commit is contained in:
2025-11-04 22:33:26 +01:00
parent 179a65c976
commit 3fdd5342cb
+2 -2
View File
@@ -45,7 +45,7 @@ class Buffer
size_t m_capacity;
size_t m_allocated_capacity;
std::vector<T> m_buffer;
std::vector<T> &m_buffer;
public:
Buffer(size_t capacity)
@@ -54,7 +54,7 @@ class Buffer
, m_offset(0)
, m_increment(1)
, m_capacity(0)
, m_buffer()
, m_buffer(*new std::vector<T>)
, m_allocated_capacity(1)
{
resize(capacity);