commit | 63654ef024d62515a1bc22791b638edf2c032246 | [log] [tgz] |
---|---|---|
author | Danil Chapovalov <danilchap@webrtc.org> | Mon Jan 17 13:10:48 2022 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jan 17 15:01:02 2022 |
tree | aabcabac76f752d230909f3e271dae388a6a9647 | |
parent | 902b55457aa073730a0b996f2ff3c8e0368e42ce [diff] |
Remove manual implementaion of the c++17 insert_or_assign In favor of the standard one https://en.cppreference.com/w/cpp/container/map/insert_or_assign Bug: None Change-Id: I35e7a2fa11603caefca66e7caa3ecd1396601c98 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247181 Auto-Submit: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35711}
diff --git a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc index ae960ab..0bc4f6d 100644 --- a/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc +++ b/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc
@@ -278,13 +278,7 @@ TimeoutStreams(now); RTC_DCHECK(inter_arrival_); RTC_DCHECK(estimator_); - // TODO(danilchap): Replace 5 lines below with insert_or_assign when that - // c++17 function is available. - auto inserted = ssrcs_.insert(std::make_pair(ssrc, now)); - if (!inserted.second) { - // Already inserted, update. - inserted.first->second = now; - } + ssrcs_.insert_or_assign(ssrc, now); // For now only try to detect probes while we don't have a valid estimate. // We currently assume that only packets larger than 200 bytes are paced by