diff --git a/common/rediscommand.cpp b/common/rediscommand.cpp index 8616dea34..3b8ed7041 100644 --- a/common/rediscommand.cpp +++ b/common/rediscommand.cpp @@ -128,7 +128,7 @@ int RedisCommand::appendTo(redisContext *ctx) const return redisAppendFormattedCommand(ctx, c_str(), length()); } -std::string RedisCommand::printable_string() const +std::string RedisCommand::toPrintableString() const { return binary_to_printable(temp, len); } diff --git a/common/rediscommand.h b/common/rediscommand.h index 84af34132..3e30dea9a 100644 --- a/common/rediscommand.h +++ b/common/rediscommand.h @@ -68,7 +68,7 @@ class RedisCommand { int appendTo(redisContext *ctx) const; - std::string printable_string() const; + std::string toPrintableString() const; private: const char *c_str() const; diff --git a/common/redisreply.cpp b/common/redisreply.cpp index d3f0c5334..8e3e73602 100644 --- a/common/redisreply.cpp +++ b/common/redisreply.cpp @@ -89,9 +89,9 @@ RedisReply::RedisReply(RedisContext *ctx, const RedisCommand& command) rc = redisGetReply(ctx->getContext(), (void**)&m_reply); if (rc != REDIS_OK) { - throw RedisError("Failed to redisGetReply with " + command.printable_string(), ctx->getContext()); + throw RedisError("Failed to redisGetReply with " + command.toPrintableString(), ctx->getContext()); } - guard([&]{checkReply();}, command.printable_string().c_str()); + guard([&]{checkReply();}, command.toPrintableString().c_str()); } RedisReply::RedisReply(RedisContext *ctx, const string& command) @@ -115,7 +115,7 @@ RedisReply::RedisReply(RedisContext *ctx, const string& command) RedisReply::RedisReply(RedisContext *ctx, const RedisCommand& command, int expectedType) : RedisReply(ctx, command) { - guard([&]{checkReplyType(expectedType);}, command.printable_string().c_str()); + guard([&]{checkReplyType(expectedType);}, command.toPrintableString().c_str()); } RedisReply::RedisReply(RedisContext *ctx, const string& command, int expectedType)