diff --git a/src/qvi-bbuff.cc b/src/qvi-bbuff.cc index b0d7853..b50bf65 100644 --- a/src/qvi-bbuff.cc +++ b/src/qvi-bbuff.cc @@ -37,6 +37,14 @@ qvi_bbuff::~qvi_bbuff(void) if (m_data) free(m_data); } +void +qvi_bbuff::operator=( + const qvi_bbuff &src +) { + const int rc = append(src.m_data, src.m_size); + if (qvi_unlikely(rc != QV_SUCCESS)) throw qvi_runtime_error(); +} + size_t qvi_bbuff::size(void) const { diff --git a/src/qvi-bbuff.h b/src/qvi-bbuff.h index 49e2ab2..6f3b3e1 100644 --- a/src/qvi-bbuff.h +++ b/src/qvi-bbuff.h @@ -42,7 +42,7 @@ struct qvi_bbuff { ~qvi_bbuff(void); /** Assignment operator. */ void - operator=(const qvi_bbuff &src) = delete; + operator=(const qvi_bbuff &src); /** Returns the size of the data stored in the byte buffer. */ size_t size(void) const;