summaryrefslogtreecommitdiff
path: root/src/packedintarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/packedintarray.cpp')
-rw-r--r--src/packedintarray.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/packedintarray.cpp b/src/packedintarray.cpp
index 7c54063..0e137bf 100644
--- a/src/packedintarray.cpp
+++ b/src/packedintarray.cpp
@@ -127,6 +127,26 @@ void PackedIntArray::set( const PackedIntArray &rSrc, int iStart, int iSize )
127 } 127 }
128} 128}
129 129
130void PackedIntArray::set( const PackedIntArray &rSrc )
131{
132 delete[] aData;
133
134 iBitWidth = rSrc.iBitWidth;
135 iCapacity = rSrc.iCapacity;
136 iCount = rSrc.iCount;
137 uMask = rSrc.uMask;
138
139 int iSize = StoreCount(iCapacity);
140 aData = new Store[iSize];
141 memcpy( aData, rSrc.aData, iSize*sizeof(Store) );
142}
143
144void PackedIntArray::trim()
145{
146 while( iCount > 0 && get( iCount-1 ) == 0 )
147 iCount--;
148}
149
130Bu::String PackedIntArray::toBitString() const 150Bu::String PackedIntArray::toBitString() const
131{ 151{
132 Bu::String sRet; 152 Bu::String sRet;