Skip to content

Commit

Permalink
dubbo: clang-tidy fix (#7587)
Browse files Browse the repository at this point in the history
Fix merge race of #7118 and #7447

Risk Level: Low
Testing: n/a
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
  • Loading branch information
lizan authored and zuercher committed Jul 16, 2019
1 parent 101f815 commit 49635f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions source/extensions/filters/network/dubbo_proxy/decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ DecoderStateMachine::onDecodeStreamHeader(Buffer::Instance& buffer) {
ENVOY_LOG(debug, "dubbo decoder: this is the {} heartbeat message", protocol_.name());
buffer.drain(context->header_size());
delegate_.onHeartbeat(metadata);
return DecoderStatus(ProtocolState::Done);
return {ProtocolState::Done};
}

active_stream_ = delegate_.newStream(metadata, context);
ASSERT(active_stream_);
context->message_origin_data().move(buffer, context->header_size());

return DecoderStatus(ProtocolState::OnDecodeStreamData);
return {ProtocolState::OnDecodeStreamData};
}

DecoderStateMachine::DecoderStatus
Expand All @@ -42,7 +42,7 @@ DecoderStateMachine::onDecodeStreamData(Buffer::Instance& buffer) {
if (!protocol_.decodeData(buffer, active_stream_->context_, active_stream_->metadata_)) {
ENVOY_LOG(debug, "dubbo decoder: need more data for {} serialization, current size {}",
protocol_.serializer()->name(), buffer.length());
return DecoderStatus(ProtocolState::WaitForData);
return {ProtocolState::WaitForData};
}

active_stream_->context_->message_origin_data().move(buffer,
Expand All @@ -51,7 +51,7 @@ DecoderStateMachine::onDecodeStreamData(Buffer::Instance& buffer) {
active_stream_ = nullptr;

ENVOY_LOG(debug, "dubbo decoder: ends the deserialization of the message");
return DecoderStatus(ProtocolState::Done);
return {ProtocolState::Done};
}

DecoderStateMachine::DecoderStatus DecoderStateMachine::handleState(Buffer::Instance& buffer) {
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/network/dubbo_proxy/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class DecoderStateMachine : public Logger::Loggable<Logger::Id::dubbo> {
private:
struct DecoderStatus {
DecoderStatus() = default;
DecoderStatus(ProtocolState next_state) : next_state_(next_state), filter_status_{} {};
DecoderStatus(ProtocolState next_state) : next_state_(next_state){};
DecoderStatus(ProtocolState next_state, FilterStatus filter_status)
: next_state_(next_state), filter_status_(filter_status){};

Expand Down

0 comments on commit 49635f4

Please sign in to comment.