summaryrefslogtreecommitdiff
path: root/src/packedintarray.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-17 20:36:32 -0600
committerMike Buland <mike@xagasoft.com>2013-04-17 20:36:32 -0600
commit10559f103a72a36eda3e9649ffb229b1b39743c0 (patch)
tree769153b7387eb065f9b6ae6c43114e6bc250af5e /src/packedintarray.cpp
parent01bb2607cbd50b944f6abd89b31514ee535490cd (diff)
downloadclic-10559f103a72a36eda3e9649ffb229b1b39743c0.tar.gz
clic-10559f103a72a36eda3e9649ffb229b1b39743c0.tar.bz2
clic-10559f103a72a36eda3e9649ffb229b1b39743c0.tar.xz
clic-10559f103a72a36eda3e9649ffb229b1b39743c0.zip
Fractional portions parse now.
Diffstat (limited to 'src/packedintarray.cpp')
-rw-r--r--src/packedintarray.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/packedintarray.cpp b/src/packedintarray.cpp
index 0e137bf..badc829 100644
--- a/src/packedintarray.cpp
+++ b/src/packedintarray.cpp
@@ -31,12 +31,13 @@ PackedIntArray::PackedIntArray( PackedIntArray::Unit iBitWidth ) :
31PackedIntArray::PackedIntArray( PackedIntArray::Unit iBitWidth, int iCount ): 31PackedIntArray::PackedIntArray( PackedIntArray::Unit iBitWidth, int iCount ):
32 iBitWidth( iBitWidth ), 32 iBitWidth( iBitWidth ),
33 aData( NULL ), 33 aData( NULL ),
34 iCapacity( StoreCount(iCount) ), 34 iCapacity( bitsizeof(StoreCount(iCount))/iBitWidth ),
35 iCount( iCount ), 35 iCount( iCount ),
36 uMask( 0 ) 36 uMask( 0 )
37{ 37{
38 aData = new Store[StoreCount(iCapacity)]; 38 int iSize = StoreCount(iCapacity);
39 memset( aData, 0, StoreCount(iCapacity)); 39 aData = new Store[iSize];
40 memset( aData, 0, iSize*sizeof(Store));
40 for( int j = 0; j < iBitWidth; j++ ) 41 for( int j = 0; j < iBitWidth; j++ )
41 uMask |= (1<<j); 42 uMask |= (1<<j);
42} 43}