fix non-portable behavior in encoder

Summary:
using ~0UL for mask uses a uint32_t at least in MSVC, but a uint64_t is required for it to work properly
Closes https://github.com/facebook/rocksdb/pull/1777

Differential Revision: D4444004

Pulled By: yiwu-arbug

fbshipit-source-id: 057cc42
This commit is contained in:
jsteemann 2017-01-20 16:26:16 -08:00 committed by Facebook Github Bot
parent 753ff84a3d
commit aebfd1703b
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ size_t FixedLengthColBufDecoder::Decode(const char* src, char** dest) {
col_compression_type_ == kColRleDeltaVarint) {
// does not support 64 bit
uint64_t mask = (write_val & 1) ? (~0UL) : 0;
uint64_t mask = (write_val & 1) ? (~uint64_t(0)) : 0;
int64_t delta = (write_val >> 1) ^ mask;
write_val = last_val_ + delta;