Skip to content

Commit 1f6e115

Browse files
committed
Standardizing.
1 parent 297d6a7 commit 1f6e115

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/xorfilter/4wise_xor_binary_fuse_filter_lowmem.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ Status XorBinaryFuseFilter<ItemType, FingerprintType, HashFamily>::AddAll(
174174
reverseOrder[startPos[segment_index]] = hash;
175175
startPos[segment_index]++;
176176
}
177+
uint8_t countMask = 0;
177178
for (size_t i = 0; i < size; i++) {
178179
uint64_t hash = reverseOrder[i];
179180
for (int hi = 0; hi < 4; hi++) {
@@ -183,14 +184,16 @@ Status XorBinaryFuseFilter<ItemType, FingerprintType, HashFamily>::AddAll(
183184
t2hash[index] ^= hash;
184185
// this branch is never taken except if there is a problem in the hash code
185186
// in which case construction would fail
186-
if (t2count[index] >= 0x80) {
187-
goto counter_overflow;
188-
}
187+
countMask |= t2count[index];
189188
}
190189
}
191-
counter_overflow:
192190
delete[] startPos;
193-
191+
if (countMask >= 0x80) {
192+
// we have a possible counter overflow
193+
// this branch is never taken except if there is a problem in the hash code
194+
// in which case construction fails
195+
continue;
196+
}
194197
reverseOrderPos = 0;
195198
size_t alonePos = 0;
196199
for (size_t i = 0; i < arrayLength; i++) {

0 commit comments

Comments
 (0)