jamesge commented on a change in pull request #972: Redis server protocol
URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r360760870
##########
File path: src/brpc/redis_reply.h
##########
@@ -200,11 +286,16 @@ inline const char* RedisReply::error_message() const {
}
inline size_t RedisReply::size() const {
- return (is_array() ? _length : 0);
+ return _length;
+}
+
+inline RedisReply& RedisReply::operator[](size_t index) {
+ return const_cast<RedisReply&>(
+ const_cast<const RedisReply*>(this)->operator[](index));
}
inline const RedisReply& RedisReply::operator[](size_t index) const {
- if (is_array() && index < _length) {
+ if (is_array() && (int)index < _length) {
Review comment:
index < (size_t)_length
----------------------------------------------------------------
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]