diff options
author | Victor Costan <costan@google.com> | 2019-05-28 10:17:03 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2019-05-28 15:44:32 -0700 |
commit | 863f185970eff21e826e5fe1164a6215a515c23b (patch) | |
tree | 1c612a139d39b3a9ec2279cd08532b19828a140f /table | |
parent | a3b71c1ff65e30ced00e85ebbca9ae5786af6626 (diff) | |
download | leveldb-863f185970eff21e826e5fe1164a6215a515c23b.tar.gz |
unsigned char -> uint8_t
PiperOrigin-RevId: 250309603
Diffstat (limited to 'table')
-rw-r--r-- | table/block.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/table/block.cc b/table/block.cc index 05c600f..2fe89ea 100644 --- a/table/block.cc +++ b/table/block.cc @@ -7,6 +7,7 @@ #include "table/block.h" #include <algorithm> +#include <cstdint> #include <vector> #include "leveldb/comparator.h" @@ -55,9 +56,9 @@ static inline const char* DecodeEntry(const char* p, const char* limit, uint32_t* shared, uint32_t* non_shared, uint32_t* value_length) { if (limit - p < 3) return nullptr; - *shared = reinterpret_cast<const unsigned char*>(p)[0]; - *non_shared = reinterpret_cast<const unsigned char*>(p)[1]; - *value_length = reinterpret_cast<const unsigned char*>(p)[2]; + *shared = reinterpret_cast<const uint8_t*>(p)[0]; + *non_shared = reinterpret_cast<const uint8_t*>(p)[1]; + *value_length = reinterpret_cast<const uint8_t*>(p)[2]; if ((*shared | *non_shared | *value_length) < 128) { // Fast path: all three values are encoded in one byte each p += 3; |