liumh8 commented on a change in pull request #1128: URL: https://github.com/apache/incubator-brpc/pull/1128#discussion_r436566453
########## File path: src/brpc/redis.cpp ########## @@ -437,19 +437,21 @@ std::ostream& operator<<(std::ostream& os, const RedisResponse& response) { } bool RedisService::AddCommandHandler(const std::string& name, RedisCommandHandler* handler) { Review comment: 已修改 ########## File path: src/brpc/redis.h ########## @@ -224,11 +225,13 @@ class RedisService { bool AddCommandHandler(const std::string& name, RedisCommandHandler* handler); // This function should not be touched by user and used by brpc deverloper only. - RedisCommandHandler* FindCommandHandler(const std::string& name) const; + RedisCommandHandler* FindCommandHandler(const butil::StringPiece& name) const; private: - typedef std::unordered_map<std::string, RedisCommandHandler*> CommandMap; + typedef BUTIL_HASH_NAMESPACE::hash<butil::StringPiece> StringPieceHasher; + typedef std::unordered_map<butil::StringPiece, RedisCommandHandler*, StringPieceHasher> CommandMap; 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org