Merge pull request #276 from wankai/master
replace hard-coded number with named variable
This commit is contained in:
commit
7c16e39228
@ -30,7 +30,7 @@ const unsigned char kSizeInlineLimit = 0x3F;
|
|||||||
size_t EncodeSize(EntryType type, uint32_t key_size, char* out_buffer) {
|
size_t EncodeSize(EntryType type, uint32_t key_size, char* out_buffer) {
|
||||||
out_buffer[0] = type << 6;
|
out_buffer[0] = type << 6;
|
||||||
|
|
||||||
if (key_size < 0x3F) {
|
if (key_size < static_cast<uint32_t>(kSizeInlineLimit)) {
|
||||||
// size inlined
|
// size inlined
|
||||||
out_buffer[0] |= static_cast<char>(key_size);
|
out_buffer[0] |= static_cast<char>(key_size);
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user