Explicit comparisons on NetworkRoute.

Since not all fields are compared on NetworkRoute structs, the ==
operator overload doesn't really make the code easier to read. In fact
the feature that it only compares a subset of the fields is only used
once, at the other places, all fields are compared.

Removing the overload makes it more clear what is compared at each call
site.

Bug: webrtc:9883
Change-Id: I74f7eb32b602aa33fd282a815b71a172ae3f6a8b
Reviewed-on: https://webrtc-review.googlesource.com/c/113001
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25891}
This commit is contained in:
Sebastian Jansson
2018-12-04 11:16:19 +01:00
committed by Commit Bot
parent c4f120130f
commit af2adda252
4 changed files with 14 additions and 19 deletions

View File

@ -236,7 +236,9 @@ void RtpTransportControllerSend::OnNetworkRouteChanged(
// No need to reset BWE if this is the first time the network connects.
return;
}
if (kv->second != network_route) {
if (kv->second.connected != network_route.connected ||
kv->second.local_network_id != network_route.local_network_id ||
kv->second.remote_network_id != network_route.remote_network_id) {
kv->second = network_route;
BitrateConstraints bitrate_config = bitrate_configurator_.GetConfig();
RTC_LOG(LS_INFO) << "Network route changed on transport " << transport_name