Commit bac28da1 authored by Philip Pronin's avatar Philip Pronin Committed by Sara Golemon

fix missing change from D1156950

Test Plan: fbconfig -r folly/experimental/test:eliasfano_test && fbmake runtests_opt

Reviewed By: lucian@fb.com

FB internal diff: D1161670
parent fbc0b3d8
...@@ -213,7 +213,12 @@ struct EliasFanoEncoder { ...@@ -213,7 +213,12 @@ struct EliasFanoEncoder {
/* static */ if (forwardQuantum != 0) { /* static */ if (forwardQuantum != 0) {
// Workaround to avoid 'division by zero' compile-time error. // Workaround to avoid 'division by zero' compile-time error.
constexpr size_t q = forwardQuantum ?: 1; constexpr size_t q = forwardQuantum ?: 1;
/* static */ if (kVersion > 0) {
CHECK_LT(upperBound >> numLowerBits,
std::numeric_limits<SkipValueType>::max());
} else {
CHECK_LT(upperSizeBits, std::numeric_limits<SkipValueType>::max()); CHECK_LT(upperSizeBits, std::numeric_limits<SkipValueType>::max());
}
numForwardPointers = size / q; numForwardPointers = size / q;
forwardPointers = static_cast<SkipValueType*>( forwardPointers = static_cast<SkipValueType*>(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment