aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/blob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unstable/blob.cpp')
-rw-r--r--src/unstable/blob.cpp20
1 files changed, 20 insertions, 0 deletions
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
142 return pData == NULL || iSize == 0; 142 return pData == NULL || iSize == 0;
143} 143}
144 144
145void Bu::Blob::set( const Blob &rRhs )
146{
147 *this = rRhs;
148}
149
150void Bu::Blob::set( const char *pRhs )
151{
152 *this = pRhs;
153}
154
155void Bu::Blob::set( const char *pRhs, int32_t iSize )
156{
157 delete[] pData;
158
159 this->iSize = iSize;
160 pData = new char[iSize+1];
161 memcpy( pData, pRhs, iSize );
162 pData[iSize] = '\0';
163}
164
145Bu::Blob &Bu::Blob::operator=( const Bu::Blob &rRhs ) 165Bu::Blob &Bu::Blob::operator=( const Bu::Blob &rRhs )
146{ 166{
147 delete[] pData; 167 delete[] pData;