yiguolei commented on code in PR #51766:
URL: https://github.com/apache/doris/pull/51766#discussion_r2159806368


##########
be/src/util/jsonb_document.h:
##########
@@ -484,67 +496,71 @@ class JsonbKeyValue {
 public:
     // now we use sMaxKeyId to represent an empty key
     static const int sMaxKeyId = 65535;
-    typedef uint16_t keyid_type;
+    using keyid_type = uint16_t;
+
+    JsonbKeyValue() = delete;
 
     static const uint8_t sMaxKeyLen = 64;
 
     // size of the key. 0 indicates it is stored as id
-    uint8_t klen() const { return size_; }
+    uint8_t klen() const { return size; }
 
     // get the key string. Note the string may not be null terminated.
-    const char* getKeyStr() const { return key_.str_; }
+    const char* getKeyStr() const { return key.str_; }
 
-    keyid_type getKeyId() const { return key_.id_; }
+    keyid_type getKeyId() const { return key.id_; }
 
     unsigned int keyPackedBytes() const {
-        return size_ ? (sizeof(size_) + size_) : (sizeof(size_) + 
sizeof(keyid_type));
+        return size ? (sizeof(size) + size) : (sizeof(size) + 
sizeof(keyid_type));
     }
 
     JsonbValue* value() const { return (JsonbValue*)(((char*)this) + 
keyPackedBytes()); }
 
     // size of the total packed bytes (key+value)
     unsigned int numPackedBytes() const;
 
-private:
-    uint8_t size_;
+    uint8_t size;

Review Comment:
   他之前的风格是对的, 用_ 结尾变量的声明



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to