mirror of https://github.com/facebook/rocksdb.git
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:
parent
753ff84a3d
commit
aebfd1703b
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue