From 85219c48da0d3fff98a9d741e09d34e74abfec0b Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 17 Apr 2013 22:58:52 -0600 Subject: 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. --- src/packedintarray.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/packedintarray.cpp') 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 ) memcpy( aData, rSrc.aData, iSize*sizeof(Store) ); } +void PackedIntArray::copy( int iDest, const PackedIntArray &rSrc, int iStart, + int iSize ) +{ + iCount = iSize; + checkCapacity(); + + for( int j = 0; j < iSize; j++ ) + { + set( j+iDest, rSrc.get( iStart+j ) ); + } +} + void PackedIntArray::trim() { while( iCount > 0 && get( iCount-1 ) == 0 ) -- cgit v1.2.3