From c48f9ef3547c6b821894e72fd1efdcef8146dc88 Mon Sep 17 00:00:00 2001 From: Ali Tofigh Date: Wed, 17 Aug 2022 19:20:04 +0200 Subject: [PATCH] Add an explicit conversion from absl::string_view to std::string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:13579 Change-Id: I3eacd1130840f46036e00bc3fc2201880feb4994 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272100 Reviewed-by: Erik Språng Commit-Queue: Ali Tofigh Cr-Commit-Position: refs/heads/main@{#37815} --- call/rtp_transport_controller_send.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/call/rtp_transport_controller_send.cc b/call/rtp_transport_controller_send.cc index fd9597dfe9..64b18e5866 100644 --- a/call/rtp_transport_controller_send.cc +++ b/call/rtp_transport_controller_send.cc @@ -280,8 +280,11 @@ void RtpTransportControllerSend::OnNetworkRouteChanged( ApplyOrLiftRelayCap(IsRelayed(network_route)); // Check whether the network route has changed on each transport. - auto result = - network_routes_.insert(std::make_pair(transport_name, network_route)); + auto result = network_routes_.insert( + // Explicit conversion of transport_name to std::string here is necessary + // to support some platforms that cannot yet deal with implicit + // conversion in these types of situations. + std::make_pair(std::string(transport_name), network_route)); auto kv = result.first; bool inserted = result.second; if (inserted || !(kv->second == network_route)) {