jamesge commented on a change in pull request #972: Redis server protocol
URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r359141418
 
 

 ##########
 File path: src/brpc/redis_reply.h
 ##########
 @@ -137,14 +174,26 @@ inline std::ostream& operator<<(std::ostream& os, const 
RedisReply& r) {
     return os;
 }
 
-inline RedisReply::RedisReply()
-    : _type(REDIS_REPLY_NIL)
-    , _length(0) {
+inline void RedisReply::Reset() {
+    _type = REDIS_REPLY_NIL;
+    _length = 0;
     _data.array.last_index = -1;
     _data.array.replies = NULL;
 }
 
-inline bool RedisReply::is_nil() const { return _type == REDIS_REPLY_NIL; }
+inline RedisReply::RedisReply(butil::Arena* arena) {
+    Reset();
+    _arena = arena;
 
 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to