Skip to content

Commit 845131b

Browse files
committed
Some code simplification
1 parent b0cd845 commit 845131b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/xorfilter_plus.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,7 @@ Status XorFilterPlus<ItemType, FingerprintType, HashFamily>::AddAll(
346346
delete [] reverseH;
347347

348348
uint64_t bitCount = blockLength;
349-
size_t wordlen = (bitCount + 63) / 64;
350-
uint64_t *bits = new uint64_t[wordlen];//was /63 but it is suspicious
351-
memset(bits,0,wordlen*sizeof(uint64_t)); // seems wrong that there is no init
349+
uint64_t *bits = new uint64_t[(bitCount + 63) / 64]();
352350
int setBits = 0;
353351
for (size_t i = 0; i < blockLength; i++) {
354352
FingerprintType f = fp[i + 2 * blockLength];

0 commit comments

Comments
 (0)