diff --git a/source/common/upstream/cds_api_impl.cc b/source/common/upstream/cds_api_impl.cc index b05ae5802cd3..0ca7d5763d5a 100644 --- a/source/common/upstream/cds_api_impl.cc +++ b/source/common/upstream/cds_api_impl.cc @@ -44,8 +44,8 @@ void CdsApiImpl::onConfigUpdate(const std::vector& r clusters_to_remove.erase(resource.get().name()); } Protobuf::RepeatedPtrField to_remove_repeated; - for (const auto& cluster : clusters_to_remove) { - *to_remove_repeated.Add() = cluster.first; + for (const auto& [cluster_name, _] : clusters_to_remove) { + *to_remove_repeated.Add() = cluster_name; } onConfigUpdate(resources, to_remove_repeated, version_info); }