Removing usage of std::unordered_set
In Chromium, they are discouraged.
Bug: webrtc:12689
Change-Id: I0e2a03b909d8a6d239e11969659e4fdc1a89766c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229188
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34880}
diff --git a/audio/BUILD.gn b/audio/BUILD.gn
index 56b974d..ea6b9d2 100644
--- a/audio/BUILD.gn
+++ b/audio/BUILD.gn
@@ -92,6 +92,7 @@
"../rtc_base:rtc_task_queue",
"../rtc_base:safe_minmax",
"../rtc_base:threading",
+ "../rtc_base/containers:flat_set",
"../rtc_base/experiments:field_trial_parser",
"../rtc_base/synchronization:mutex",
"../rtc_base/system:no_unique_address",
diff --git a/audio/audio_state.h b/audio/audio_state.h
index 89c748d..55f3551 100644
--- a/audio/audio_state.h
+++ b/audio/audio_state.h
@@ -13,12 +13,12 @@
#include <map>
#include <memory>
-#include <unordered_set>
#include "api/sequence_checker.h"
#include "audio/audio_transport_impl.h"
#include "audio/null_audio_poller.h"
#include "call/audio_state.h"
+#include "rtc_base/containers/flat_set.h"
#include "rtc_base/ref_count.h"
namespace webrtc {
@@ -80,7 +80,7 @@
// stats are still updated.
std::unique_ptr<NullAudioPoller> null_audio_poller_;
- std::unordered_set<webrtc::AudioReceiveStream*> receiving_streams_;
+ webrtc::flat_set<webrtc::AudioReceiveStream*> receiving_streams_;
struct StreamProperties {
int sample_rate_hz = 0;
size_t num_channels = 0;