summaryrefslogtreecommitdiff
path: root/src/packedintarray.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-17 22:58:52 -0600
committerMike Buland <mike@xagasoft.com>2013-04-17 22:58:52 -0600
commit85219c48da0d3fff98a9d741e09d34e74abfec0b (patch)
tree39a5b8c13926dd2083c8552d701276678f6515c5 /src/packedintarray.cpp
parent55ef5612f8950bd042ffd6d001908845a4321f8e (diff)
downloadclic-85219c48da0d3fff98a9d741e09d34e74abfec0b.tar.gz
clic-85219c48da0d3fff98a9d741e09d34e74abfec0b.tar.bz2
clic-85219c48da0d3fff98a9d741e09d34e74abfec0b.tar.xz
clic-85219c48da0d3fff98a9d741e09d34e74abfec0b.zip
Division, attempt one - broken.
It doesn't work by any means, and I think I confused myself partway through. I shouldn't code when I'm that tired, at least not on something this complex.
Diffstat (limited to 'src/packedintarray.cpp')
-rw-r--r--src/packedintarray.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/packedintarray.cpp b/src/packedintarray.cpp
index d395aa2..bcd2f66 100644
--- a/src/packedintarray.cpp
+++ b/src/packedintarray.cpp
@@ -142,6 +142,18 @@ void PackedIntArray::set( const PackedIntArray &rSrc )
142 memcpy( aData, rSrc.aData, iSize*sizeof(Store) ); 142 memcpy( aData, rSrc.aData, iSize*sizeof(Store) );
143} 143}
144 144
145void PackedIntArray::copy( int iDest, const PackedIntArray &rSrc, int iStart,
146 int iSize )
147{
148 iCount = iSize;
149 checkCapacity();
150
151 for( int j = 0; j < iSize; j++ )
152 {
153 set( j+iDest, rSrc.get( iStart+j ) );
154 }
155}
156
145void PackedIntArray::trim() 157void PackedIntArray::trim()
146{ 158{
147 while( iCount > 0 && get( iCount-1 ) == 0 ) 159 while( iCount > 0 && get( iCount-1 ) == 0 )