commit after resolving conflict
authorHamed <hamed.gorjiara@gmail.com>
Tue, 20 Jun 2017 01:22:29 +0000 (18:22 -0700)
committerHamed <hamed.gorjiara@gmail.com>
Tue, 20 Jun 2017 01:22:29 +0000 (18:22 -0700)
1  2 
src/Encoders/naiveelementencoder.c

@@@ -3,16 -3,21 +3,21 @@@
  #include "element.h"
  #include "set.h"
  #include "common.h"
 -#include "struct.h"
 +#include "structs.h"
+ #include <strings.h>
  
  void baseBinaryIndexElementAssign(ElementEncoding *This) {
        Element * element=This->element;
        Set * set=element->set;
        ASSERT(set->isRange==false);
        uint size=getSizeVectorInt(set->members);
-       This->encodingArray=ourmalloc(sizeof(uint64_t)*size);
+       uint encSize=NEXTPOW2(size);
+       allocEncodingArrayElement(This, encSize);
+       allocInUseArrayElement(This, encSize);
        for(uint i=0;i<size;i++) {
                This->encodingArray[i]=getVectorInt(set->members, i);
+               setInUseElement(This, i);
        }
-       This->type=BINARYINDEX;
  }