diff options
author | Mike Buland <mike@xagasoft.com> | 2013-04-17 22:58:52 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2013-04-17 22:58:52 -0600 |
commit | 85219c48da0d3fff98a9d741e09d34e74abfec0b (patch) | |
tree | 39a5b8c13926dd2083c8552d701276678f6515c5 /src/packedintarray.cpp | |
parent | 55ef5612f8950bd042ffd6d001908845a4321f8e (diff) | |
download | clic-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 '')
-rw-r--r-- | src/packedintarray.cpp | 12 |
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 | ||
145 | void 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 | |||
145 | void PackedIntArray::trim() | 157 | void PackedIntArray::trim() |
146 | { | 158 | { |
147 | while( iCount > 0 && get( iCount-1 ) == 0 ) | 159 | while( iCount > 0 && get( iCount-1 ) == 0 ) |