summaryrefslogtreecommitdiff
path: root/src/packedintarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/packedintarray.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/packedintarray.cpp b/src/packedintarray.cpp
index 7654356..7c54063 100644
--- a/src/packedintarray.cpp
+++ b/src/packedintarray.cpp
@@ -96,7 +96,7 @@ PackedIntArray::Unit PackedIntArray::get( int idx ) const
96 return ret; 96 return ret;
97} 97}
98 98
99PackedIntArray::Unit PackedIntArray::set( int idx, PackedIntArray::Unit i ) 99void PackedIntArray::set( int idx, PackedIntArray::Unit i )
100{ 100{
101 int iStore = idx*iBitWidth/StoreBits; 101 int iStore = idx*iBitWidth/StoreBits;
102 int iBit = (idx*iBitWidth)%StoreBits; 102 int iBit = (idx*iBitWidth)%StoreBits;
@@ -116,6 +116,17 @@ PackedIntArray::Unit PackedIntArray::set( int idx, PackedIntArray::Unit i )
116 } 116 }
117} 117}
118 118
119void PackedIntArray::set( const PackedIntArray &rSrc, int iStart, int iSize )
120{
121 iCount = iSize;
122 checkCapacity();
123
124 for( int j = 0; j < iSize; j++ )
125 {
126 set( j, rSrc.get( iStart+j ) );
127 }
128}
129
119Bu::String PackedIntArray::toBitString() const 130Bu::String PackedIntArray::toBitString() const
120{ 131{
121 Bu::String sRet; 132 Bu::String sRet;