Skip to content

Commit

Permalink
fix(reply_builder): remove virtual modifier in SendError(ErrorReply) …
Browse files Browse the repository at this point in the history
…method (dragonflydb#3191)

fixes dragonflydb#3190

Signed-off-by: Stepan Bagritsevich <[email protected]>
  • Loading branch information
BagritsevichStepan authored and dranikpg committed Jun 23, 2024
1 parent c60cd7e commit 4701272
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/facade/reply_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class SinkReplyBuilder {
}

virtual void SendError(std::string_view str, std::string_view type = {}) = 0; // MC and Redis
virtual void SendError(ErrorReply error);
virtual void SendError(OpStatus status);
void SendError(ErrorReply error);

virtual void SendStored() = 0; // Reply for set commands.
virtual void SendSetSkipped() = 0;
Expand Down
5 changes: 0 additions & 5 deletions src/facade/reply_capture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ void CapturingReplyBuilder::SendError(std::string_view str, std::string_view typ
Capture(Error{str, type});
}

void CapturingReplyBuilder::SendError(ErrorReply error) {
SKIP_LESS(ReplyMode::ONLY_ERR);
Capture(Error{error.ToSv(), error.kind});
}

void CapturingReplyBuilder::SendMGetResponse(MGetResponse resp) {
SKIP_LESS(ReplyMode::FULL);
Capture(std::move(resp));
Expand Down
2 changes: 1 addition & 1 deletion src/facade/reply_capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ class CapturingReplyBuilder : public RedisReplyBuilder {

public:
void SendError(std::string_view str, std::string_view type = {}) override;
void SendError(ErrorReply error) override;
void SendMGetResponse(MGetResponse resp) override;

// SendStored -> SendSimpleString("OK")
// SendSetSkipped -> SendNull()
void SendError(OpStatus status) override;
using RedisReplyBuilder::SendError;

void SendNullArray() override;
void SendEmptyArray() override;
Expand Down

0 comments on commit 4701272

Please sign in to comment.