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:
Steve Anton
2019-03-28 10:56:11 -07:00
committed by Commit Bot
parent c90e81e2d9
commit 91c2606ca1
8 changed files with 32 additions and 35 deletions

View File

@ -13,9 +13,9 @@
#include <ctype.h>
#include <string.h>
#include <algorithm>
#include <type_traits>
#include "absl/algorithm/container.h"
#include "api/array_view.h"
namespace webrtc {
@ -33,12 +33,12 @@ bool IsTokenChar(char ch) {
bool IsLegalMidName(absl::string_view name) {
return (name.size() <= kMidRsidMaxSize && name.size() > 0 &&
std::all_of(name.data(), name.data() + name.size(), IsTokenChar));
absl::c_all_of(name, IsTokenChar));
}
bool IsLegalRsidName(absl::string_view name) {
return (name.size() <= kMidRsidMaxSize && name.size() > 0 &&
std::all_of(name.data(), name.data() + name.size(), isalnum));
absl::c_all_of(name, isalnum));
}
StreamDataCounters::StreamDataCounters() : first_packet_time_ms(-1) {}