Fixing a member var to not be a reference.

pull/23623/head
Donna Dionne 5 years ago
parent 8517f67ff6
commit 8b3224ba62
  1. 9
      src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc

@ -187,7 +187,7 @@ class XdsRoutingLb : public LoadBalancingPolicy {
RefCountedPtr<XdsRoutingLb> xds_routing_policy_; RefCountedPtr<XdsRoutingLb> xds_routing_policy_;
// Points to the corresponding key in XdsRoutingLb::actions_. // Points to the corresponding key in XdsRoutingLb::actions_.
const std::string& name_; const std::string name_;
OrphanablePtr<LoadBalancingPolicy> child_policy_; OrphanablePtr<LoadBalancingPolicy> child_policy_;
@ -407,9 +407,10 @@ void XdsRoutingLb::UpdateLocked(UpdateArgs args) {
const RefCountedPtr<LoadBalancingPolicy::Config>& config = p.second; const RefCountedPtr<LoadBalancingPolicy::Config>& config = p.second;
auto it = actions_.find(name); auto it = actions_.find(name);
if (it == actions_.end()) { if (it == actions_.end()) {
it = actions_.emplace(std::make_pair(name, nullptr)).first; it = actions_
it->second = MakeOrphanable<XdsRoutingChild>( .emplace(name, MakeOrphanable<XdsRoutingChild>(
Ref(DEBUG_LOCATION, "XdsRoutingChild"), it->first); Ref(DEBUG_LOCATION, "XdsRoutingChild"), name))
.first;
} }
it->second->UpdateLocked(config, args.addresses, args.args); it->second->UpdateLocked(config, args.addresses, args.args);
} }

Loading…
Cancel
Save