From 32f1119d2b1b346ae7727a0f564f6b9a422008ec Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 23 Aug 2019 14:51:05 -0700 Subject: [PATCH] Strict C++ --- .../client_channel/lb_policy/xds/xds_load_balancer_api.h | 3 ++- src/core/ext/filters/client_channel/resolving_lb_policy.cc | 2 ++ src/core/lib/channel/channelz.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h b/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h index cea5b50b9bad8..759c04cd71f38 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h @@ -37,7 +37,8 @@ struct XdsLocalityInfo { // This comparator only compares the locality names. struct Less { - bool operator()(const XdsLocalityInfo& lhs, const XdsLocalityInfo& rhs) { + bool operator()(const XdsLocalityInfo& lhs, + const XdsLocalityInfo& rhs) const { return XdsLocalityName::Less()(lhs.locality_name, rhs.locality_name); } }; diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/src/core/ext/filters/client_channel/resolving_lb_policy.cc index 4b61df09959db..b3b455b0ce8d7 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.cc +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.cc @@ -160,6 +160,8 @@ class ResolvingLoadBalancingPolicy::ResolvingControlHelper } } + void AddTraceEvent(TraceSeverity severity, const char* message) override {} + void set_child(LoadBalancingPolicy* child) { child_ = child; } private: diff --git a/src/core/lib/channel/channelz.h b/src/core/lib/channel/channelz.h index 2561bff807eee..b023a5280e04d 100644 --- a/src/core/lib/channel/channelz.h +++ b/src/core/lib/channel/channelz.h @@ -81,7 +81,10 @@ class BaseNode : public RefCounted { kSocket, }; + protected: BaseNode(EntityType type, UniquePtr name); + + public: virtual ~BaseNode(); // All children must implement this function.