Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ze Gan <[email protected]>
  • Loading branch information
Pterosaur committed Jul 12, 2023
1 parent 142c060 commit 35f70ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/rediscommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion common/rediscommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions common/redisreply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 35f70ec

Please sign in to comment.