From 71ecf17eb73347063c7cc37fc5a519813ab52e71 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 24 Apr 2019 17:31:29 -0700 Subject: [PATCH] clang tidy --- src/core/ext/filters/client_channel/lb_policy/xds/xds.cc | 4 ++-- src/core/lib/gprpp/optional.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc index 9e9cee3d3a4..b25f66d1dfc 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc @@ -364,7 +364,7 @@ class XdsLb : public LoadBalancingPolicy { void UpdateLocked( xds_grpclb_serverlist* serverlist, - RefCountedPtr child_policy_config, + const RefCountedPtr& child_policy_config, const grpc_channel_args* args); void ShutdownLocked(); void ResetBackoffLocked(); @@ -412,7 +412,7 @@ class XdsLb : public LoadBalancingPolicy { void UpdateLocked( const LocalityList& locality_list, - RefCountedPtr child_policy_config, + const RefCountedPtr& child_policy_config, const grpc_channel_args* args, XdsLb* parent); void ShutdownLocked(); void ResetBackoffLocked(); diff --git a/src/core/lib/gprpp/optional.h b/src/core/lib/gprpp/optional.h index fee081bc6b4..5bead0c88ee 100644 --- a/src/core/lib/gprpp/optional.h +++ b/src/core/lib/gprpp/optional.h @@ -26,6 +26,7 @@ namespace grpc_core { template class Optional { public: + Optional() { value_ = {}; } void set(const T& val) { value_ = val; set_ = true; @@ -39,7 +40,7 @@ class Optional { private: bool set_ = false; - T value_ = {}; + T value_; }; } /* namespace grpc_core */