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}
This commit is contained in:
Danil Chapovalov 2022-01-17 14:10:48 +01:00 committed by WebRTC LUCI CQ
parent 902b55457a
commit 63654ef024

View File

@ -278,13 +278,7 @@ void RemoteBitrateEstimatorAbsSendTime::IncomingPacketInfo(
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