Use Abseil container algorithms in rtc_base/

Bug: None
Change-Id: I4499adaf8e777d570a3bc119ee29727ab7c790a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128962
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27271}
This commit is contained in:
Steve Anton
2019-03-25 13:48:30 -07:00
committed by Commit Bot
parent 8f4338495d
commit 2acd163448
16 changed files with 76 additions and 93 deletions

View File

@ -13,9 +13,9 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <string>
#include "absl/algorithm/container.h"
#include "rtc_base/async_socket.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
@ -198,8 +198,7 @@ void FirewallSocketServer::SetUnbindableIps(
}
bool FirewallSocketServer::IsBindableIp(const rtc::IPAddress& ip) {
return std::find(unbindable_ips_.begin(), unbindable_ips_.end(), ip) ==
unbindable_ips_.end();
return !absl::c_linear_search(unbindable_ips_, ip);
}
Socket* FirewallSocketServer::CreateSocket(int family, int type) {