Use Abseil container algorithms in modules/rtp_rtcp/
Bug: None Change-Id: Ica2e9795ec6195e044403f5ee25e476f6c47cf93 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129600 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27361}
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
@ -36,13 +37,13 @@ int EffectivePacketsSizeDifference(
|
||||
// Account for larger last packet header.
|
||||
sizes.back() += limits.last_packet_reduction_len;
|
||||
|
||||
auto minmax = std::minmax_element(sizes.begin(), sizes.end());
|
||||
auto minmax = absl::c_minmax_element(sizes);
|
||||
// MAX-MIN
|
||||
return *minmax.second - *minmax.first;
|
||||
}
|
||||
|
||||
int Sum(const std::vector<int>& sizes) {
|
||||
return std::accumulate(sizes.begin(), sizes.end(), 0);
|
||||
return absl::c_accumulate(sizes, 0);
|
||||
}
|
||||
|
||||
TEST(RtpPacketizerSplitAboutEqually, AllPacketsAreEqualSumToPayloadLen) {
|
||||
|
||||
Reference in New Issue
Block a user