From fd56cdd21a7c9c944ad189cf91ff24d3c2b0f975 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 20 Apr 2022 14:04:47 -0700 Subject: Gradually moving to better archive structure. It's dragging other new API changes along with it, including use of Blob and Text. --- src/unstable/blob.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/unstable/blob.cpp') diff --git a/src/unstable/blob.cpp b/src/unstable/blob.cpp index e72e265..51e74ff 100644 --- a/src/unstable/blob.cpp +++ b/src/unstable/blob.cpp @@ -142,6 +142,26 @@ bool Bu::Blob::isNullOrEmpty() const return pData == NULL || iSize == 0; } +void Bu::Blob::set( const Blob &rRhs ) +{ + *this = rRhs; +} + +void Bu::Blob::set( const char *pRhs ) +{ + *this = pRhs; +} + +void Bu::Blob::set( const char *pRhs, int32_t iSize ) +{ + delete[] pData; + + this->iSize = iSize; + pData = new char[iSize+1]; + memcpy( pData, pRhs, iSize ); + pData[iSize] = '\0'; +} + Bu::Blob &Bu::Blob::operator=( const Bu::Blob &rRhs ) { delete[] pData; -- cgit v1.2.3