Use Abseil container algorithms in media/
Bug: None
Change-Id: I292e3401bbf19a66271dd5ef2b3ca4f8dcfd155d
Reviewed-on: https://webrtc-review.googlesource.com/c/120003
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26434}
diff --git a/media/base/fake_media_engine.h b/media/base/fake_media_engine.h
index ff8f44d..564b0da 100644
--- a/media/base/fake_media_engine.h
+++ b/media/base/fake_media_engine.h
@@ -19,6 +19,7 @@
#include <tuple>
#include <vector>
+#include "absl/algorithm/container.h"
#include "api/call/audio_sink.h"
#include "media/base/audio_source.h"
#include "media/base/media_engine.h"
@@ -101,8 +102,7 @@
void set_fail_set_send_codecs(bool fail) { fail_set_send_codecs_ = fail; }
void set_fail_set_recv_codecs(bool fail) { fail_set_recv_codecs_ = fail; }
virtual bool AddSendStream(const StreamParams& sp) {
- if (std::find(send_streams_.begin(), send_streams_.end(), sp) !=
- send_streams_.end()) {
+ if (absl::c_linear_search(send_streams_, sp)) {
return false;
}
send_streams_.push_back(sp);
@@ -118,8 +118,7 @@
return RemoveStreamBySsrc(&send_streams_, ssrc);
}
virtual bool AddRecvStream(const StreamParams& sp) {
- if (std::find(receive_streams_.begin(), receive_streams_.end(), sp) !=
- receive_streams_.end()) {
+ if (absl::c_linear_search(receive_streams_, sp)) {
return false;
}
receive_streams_.push_back(sp);