git-hulk commented on code in PR #791:
URL: https://github.com/apache/incubator-kvrocks/pull/791#discussion_r954606253


##########
src/encoding.cc:
##########
@@ -271,3 +271,77 @@ double DecodeDouble(const char *ptr) {
   memcpy(&value, &decoded, sizeof(value));
   return value;
 }
+
+char* EncodeVarint32(char *dst, uint32_t v) {
+  // Operate on characters as unsigneds
+  unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
+  static const int B = 128;

Review Comment:
   Yes, I also prefer to `0x80` over 128. We still need to use `ob1000000` if 
want to use binary representation since the `'` digital separator was 
introduced in C++14.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to