From 49635f47a42a6447047c2f97540041f6ca07a374 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Mon, 15 Jul 2019 17:12:42 -0700 Subject: [PATCH] dubbo: clang-tidy fix (#7587) 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 --- source/extensions/filters/network/dubbo_proxy/decoder.cc | 8 ++++---- source/extensions/filters/network/dubbo_proxy/decoder.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/extensions/filters/network/dubbo_proxy/decoder.cc b/source/extensions/filters/network/dubbo_proxy/decoder.cc index a88ade7d9ed0..f7e9cfc84a24 100644 --- a/source/extensions/filters/network/dubbo_proxy/decoder.cc +++ b/source/extensions/filters/network/dubbo_proxy/decoder.cc @@ -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 @@ -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, @@ -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) { diff --git a/source/extensions/filters/network/dubbo_proxy/decoder.h b/source/extensions/filters/network/dubbo_proxy/decoder.h index 5b04d277876e..627dc314428b 100644 --- a/source/extensions/filters/network/dubbo_proxy/decoder.h +++ b/source/extensions/filters/network/dubbo_proxy/decoder.h @@ -99,7 +99,7 @@ class DecoderStateMachine : public Logger::Loggable { 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){};