LemonLiTree commented on code in PR #19646:
URL: https://github.com/apache/doris/pull/19646#discussion_r1208906632
##########
be/src/util/jsonb_document.h:
##########
@@ -273,35 +276,43 @@ class Stream {
skip_whitespace();
}
- void clear_legPtr() { legPtr = nullptr; }
+ void clear_legPtr() { leg_ptr = nullptr; }
void set_legPtr(char* ptr) {
clear_legPtr();
- legPtr = ptr;
+ leg_ptr = ptr;
}
- char* get_legPtr() { return legPtr; }
+ char* get_legPtr() { return leg_ptr; }
- void clear_legLen() { legLen = 0; }
+ void clear_legLen() { leg_len = 0; }
- void add_legLen() { legLen++; }
+ void add_legLen() { leg_len++; }
- unsigned int get_legLen() { return legLen; }
+ unsigned int get_legLen() const { return leg_len; }
void remove_escapes() {
int new_len = 0;
- for (int i = 0; i < legLen; i++) {
- if (legPtr[i] != '\\') {
- legPtr[new_len++] = legPtr[i];
+ for (int i = 0; i < leg_len; i++) {
+ if (leg_ptr[i] != '\\') {
+ leg_ptr[new_len++] = leg_ptr[i];
}
}
- legPtr[new_len] = '\0';
- legLen = new_len;
+ leg_ptr[new_len] = '\0';
+ leg_len = new_len;
}
- void set_hasEscapes(bool has) { hasEscapes = has; }
+ void set_hasEscapes(bool has) { has_escapes = has; }
Review Comment:
done
##########
be/src/util/jsonb_document.h:
##########
@@ -273,35 +276,43 @@ class Stream {
skip_whitespace();
}
- void clear_legPtr() { legPtr = nullptr; }
+ void clear_legPtr() { leg_ptr = nullptr; }
void set_legPtr(char* ptr) {
clear_legPtr();
- legPtr = ptr;
+ leg_ptr = ptr;
}
- char* get_legPtr() { return legPtr; }
+ char* get_legPtr() { return leg_ptr; }
- void clear_legLen() { legLen = 0; }
+ void clear_legLen() { leg_len = 0; }
- void add_legLen() { legLen++; }
+ void add_legLen() { leg_len++; }
- unsigned int get_legLen() { return legLen; }
+ unsigned int get_legLen() const { return leg_len; }
void remove_escapes() {
int new_len = 0;
- for (int i = 0; i < legLen; i++) {
- if (legPtr[i] != '\\') {
- legPtr[new_len++] = legPtr[i];
+ for (int i = 0; i < leg_len; i++) {
+ if (leg_ptr[i] != '\\') {
+ leg_ptr[new_len++] = leg_ptr[i];
}
}
- legPtr[new_len] = '\0';
- legLen = new_len;
+ leg_ptr[new_len] = '\0';
+ leg_len = new_len;
}
- void set_hasEscapes(bool has) { hasEscapes = has; }
+ void set_hasEscapes(bool has) { has_escapes = has; }
- bool get_hasEscapes() { return hasEscapes; }
+ bool get_hasEscapes() const { return has_escapes; }
Review Comment:
done
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]