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}
diff --git a/rtc_base/firewall_socket_server.cc b/rtc_base/firewall_socket_server.cc
index ec5a857..f73da99 100644
--- a/rtc_base/firewall_socket_server.cc
+++ b/rtc_base/firewall_socket_server.cc
@@ -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 @@
}
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) {