From 604fd2f1ab24a229b8b75fae6ac4fac433156acf Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Fri, 21 Jan 2022 09:49:39 +0900 Subject: Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/ Bug: webrtc:13555, webrtc:13082 Change-Id: I2c2cbcbd918f0cfa970c1a964893220ba11d4b41 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247960 Reviewed-by: Artem Titov Reviewed-by: Harald Alvestrand Commit-Queue: (Daniel.L) Byoungchan Lee Cr-Commit-Position: refs/heads/main@{#35771} --- modules/audio_processing/aec3/aec3_fft.h | 6 +++--- modules/audio_processing/aec3/block_processor_metrics.h | 7 +++---- modules/audio_processing/aec3/decimator.h | 6 +++--- modules/audio_processing/aec3/echo_path_delay_estimator.h | 6 +++--- modules/audio_processing/aec3/echo_remover_metrics.h | 6 +++--- modules/audio_processing/aec3/erl_estimator.h | 5 +++-- modules/audio_processing/aec3/render_delay_controller_metrics.h | 7 ++++--- modules/audio_processing/aec3/render_signal_analyzer.h | 6 +++--- modules/audio_processing/aec3/suppression_filter.h | 6 ++++-- modules/audio_processing/aec3/suppression_gain.h | 7 ++++--- 10 files changed, 33 insertions(+), 29 deletions(-) (limited to 'modules/audio_processing/aec3') diff --git a/modules/audio_processing/aec3/aec3_fft.h b/modules/audio_processing/aec3/aec3_fft.h index 6f7fbe4d0e..c68de53963 100644 --- a/modules/audio_processing/aec3/aec3_fft.h +++ b/modules/audio_processing/aec3/aec3_fft.h @@ -18,7 +18,6 @@ #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/aec3/fft_data.h" #include "rtc_base/checks.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -30,6 +29,9 @@ class Aec3Fft { Aec3Fft(); + Aec3Fft(const Aec3Fft&) = delete; + Aec3Fft& operator=(const Aec3Fft&) = delete; + // Computes the FFT. Note that both the input and output are modified. void Fft(std::array* x, FftData* X) const { RTC_DCHECK(x); @@ -66,8 +68,6 @@ class Aec3Fft { private: const OouraFft ooura_fft_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Aec3Fft); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/block_processor_metrics.h b/modules/audio_processing/aec3/block_processor_metrics.h index 4ba053683b..a70d0dac5b 100644 --- a/modules/audio_processing/aec3/block_processor_metrics.h +++ b/modules/audio_processing/aec3/block_processor_metrics.h @@ -11,8 +11,6 @@ #ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_ #define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_ -#include "rtc_base/constructor_magic.h" - namespace webrtc { // Handles the reporting of metrics for the block_processor. @@ -20,6 +18,9 @@ class BlockProcessorMetrics { public: BlockProcessorMetrics() = default; + BlockProcessorMetrics(const BlockProcessorMetrics&) = delete; + BlockProcessorMetrics& operator=(const BlockProcessorMetrics&) = delete; + // Updates the metric with new capture data. void UpdateCapture(bool underrun); @@ -38,8 +39,6 @@ class BlockProcessorMetrics { int render_buffer_underruns_ = 0; int render_buffer_overruns_ = 0; int buffer_render_calls_ = 0; - - RTC_DISALLOW_COPY_AND_ASSIGN(BlockProcessorMetrics); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/decimator.h b/modules/audio_processing/aec3/decimator.h index 3ccd292f08..dbff3d9fff 100644 --- a/modules/audio_processing/aec3/decimator.h +++ b/modules/audio_processing/aec3/decimator.h @@ -17,7 +17,6 @@ #include "api/array_view.h" #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/utility/cascaded_biquad_filter.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -26,6 +25,9 @@ class Decimator { public: explicit Decimator(size_t down_sampling_factor); + Decimator(const Decimator&) = delete; + Decimator& operator=(const Decimator&) = delete; + // Downsamples the signal. void Decimate(rtc::ArrayView in, rtc::ArrayView out); @@ -33,8 +35,6 @@ class Decimator { const size_t down_sampling_factor_; CascadedBiQuadFilter anti_aliasing_filter_; CascadedBiQuadFilter noise_reduction_filter_; - - RTC_DISALLOW_COPY_AND_ASSIGN(Decimator); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/echo_path_delay_estimator.h b/modules/audio_processing/aec3/echo_path_delay_estimator.h index 6c8c21282e..d8f97757bb 100644 --- a/modules/audio_processing/aec3/echo_path_delay_estimator.h +++ b/modules/audio_processing/aec3/echo_path_delay_estimator.h @@ -21,7 +21,6 @@ #include "modules/audio_processing/aec3/delay_estimate.h" #include "modules/audio_processing/aec3/matched_filter.h" #include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -37,6 +36,9 @@ class EchoPathDelayEstimator { size_t num_capture_channels); ~EchoPathDelayEstimator(); + EchoPathDelayEstimator(const EchoPathDelayEstimator&) = delete; + EchoPathDelayEstimator& operator=(const EchoPathDelayEstimator&) = delete; + // Resets the estimation. If the delay confidence is reset, the reset behavior // is as if the call is restarted. void Reset(bool reset_delay_confidence); @@ -71,8 +73,6 @@ class EchoPathDelayEstimator { // Internal reset method with more granularity. void Reset(bool reset_lag_aggregator, bool reset_delay_confidence); - - RTC_DISALLOW_COPY_AND_ASSIGN(EchoPathDelayEstimator); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/echo_remover_metrics.h b/modules/audio_processing/aec3/echo_remover_metrics.h index c3d8e20da1..aec8084d78 100644 --- a/modules/audio_processing/aec3/echo_remover_metrics.h +++ b/modules/audio_processing/aec3/echo_remover_metrics.h @@ -15,7 +15,6 @@ #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/aec3/aec_state.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -34,6 +33,9 @@ class EchoRemoverMetrics { EchoRemoverMetrics(); + EchoRemoverMetrics(const EchoRemoverMetrics&) = delete; + EchoRemoverMetrics& operator=(const EchoRemoverMetrics&) = delete; + // Updates the metric with new data. void Update( const AecState& aec_state, @@ -52,8 +54,6 @@ class EchoRemoverMetrics { DbMetric erle_time_domain_; bool saturated_capture_ = false; bool metrics_reported_ = false; - - RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverMetrics); }; namespace aec3 { diff --git a/modules/audio_processing/aec3/erl_estimator.h b/modules/audio_processing/aec3/erl_estimator.h index 89bf6ace36..639a52c561 100644 --- a/modules/audio_processing/aec3/erl_estimator.h +++ b/modules/audio_processing/aec3/erl_estimator.h @@ -18,7 +18,6 @@ #include "api/array_view.h" #include "modules/audio_processing/aec3/aec3_common.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -28,6 +27,9 @@ class ErlEstimator { explicit ErlEstimator(size_t startup_phase_length_blocks_); ~ErlEstimator(); + ErlEstimator(const ErlEstimator&) = delete; + ErlEstimator& operator=(const ErlEstimator&) = delete; + // Resets the ERL estimation. void Reset(); @@ -49,7 +51,6 @@ class ErlEstimator { float erl_time_domain_; int hold_counter_time_domain_; size_t blocks_since_reset_ = 0; - RTC_DISALLOW_COPY_AND_ASSIGN(ErlEstimator); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/render_delay_controller_metrics.h b/modules/audio_processing/aec3/render_delay_controller_metrics.h index 8c527a142e..309122d80d 100644 --- a/modules/audio_processing/aec3/render_delay_controller_metrics.h +++ b/modules/audio_processing/aec3/render_delay_controller_metrics.h @@ -15,7 +15,6 @@ #include "absl/types/optional.h" #include "modules/audio_processing/aec3/clockdrift_detector.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -24,6 +23,10 @@ class RenderDelayControllerMetrics { public: RenderDelayControllerMetrics(); + RenderDelayControllerMetrics(const RenderDelayControllerMetrics&) = delete; + RenderDelayControllerMetrics& operator=(const RenderDelayControllerMetrics&) = + delete; + // Updates the metric with new data. void Update(absl::optional delay_samples, size_t buffer_delay_blocks, @@ -46,8 +49,6 @@ class RenderDelayControllerMetrics { bool metrics_reported_ = false; bool initial_update = true; int skew_shift_count_ = 0; - - RTC_DISALLOW_COPY_AND_ASSIGN(RenderDelayControllerMetrics); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/render_signal_analyzer.h b/modules/audio_processing/aec3/render_signal_analyzer.h index c7a3d8b7a0..2e4aaa4ba7 100644 --- a/modules/audio_processing/aec3/render_signal_analyzer.h +++ b/modules/audio_processing/aec3/render_signal_analyzer.h @@ -20,7 +20,6 @@ #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/aec3/render_buffer.h" #include "rtc_base/checks.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -30,6 +29,9 @@ class RenderSignalAnalyzer { explicit RenderSignalAnalyzer(const EchoCanceller3Config& config); ~RenderSignalAnalyzer(); + RenderSignalAnalyzer(const RenderSignalAnalyzer&) = delete; + RenderSignalAnalyzer& operator=(const RenderSignalAnalyzer&) = delete; + // Updates the render signal analysis with the most recent render signal. void Update(const RenderBuffer& render_buffer, const absl::optional& delay_partitions); @@ -53,8 +55,6 @@ class RenderSignalAnalyzer { std::array narrow_band_counters_; absl::optional narrow_peak_band_; size_t narrow_peak_counter_; - - RTC_DISALLOW_COPY_AND_ASSIGN(RenderSignalAnalyzer); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/suppression_filter.h b/modules/audio_processing/aec3/suppression_filter.h index dcf2292c7f..375bfda5a7 100644 --- a/modules/audio_processing/aec3/suppression_filter.h +++ b/modules/audio_processing/aec3/suppression_filter.h @@ -17,7 +17,6 @@ #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/aec3/aec3_fft.h" #include "modules/audio_processing/aec3/fft_data.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -27,6 +26,10 @@ class SuppressionFilter { int sample_rate_hz, size_t num_capture_channels_); ~SuppressionFilter(); + + SuppressionFilter(const SuppressionFilter&) = delete; + SuppressionFilter& operator=(const SuppressionFilter&) = delete; + void ApplyGain(rtc::ArrayView comfort_noise, rtc::ArrayView comfort_noise_high_bands, const std::array& suppression_gain, @@ -40,7 +43,6 @@ class SuppressionFilter { const size_t num_capture_channels_; const Aec3Fft fft_; std::vector>> e_output_old_; - RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionFilter); }; } // namespace webrtc diff --git a/modules/audio_processing/aec3/suppression_gain.h b/modules/audio_processing/aec3/suppression_gain.h index 7c4a1c9f7d..c8e13f7cf4 100644 --- a/modules/audio_processing/aec3/suppression_gain.h +++ b/modules/audio_processing/aec3/suppression_gain.h @@ -25,7 +25,6 @@ #include "modules/audio_processing/aec3/nearend_detector.h" #include "modules/audio_processing/aec3/render_signal_analyzer.h" #include "modules/audio_processing/logging/apm_data_dumper.h" -#include "rtc_base/constructor_magic.h" namespace webrtc { @@ -36,6 +35,10 @@ class SuppressionGain { int sample_rate_hz, size_t num_capture_channels); ~SuppressionGain(); + + SuppressionGain(const SuppressionGain&) = delete; + SuppressionGain& operator=(const SuppressionGain&) = delete; + void GetGain( rtc::ArrayView> nearend_spectrum, @@ -134,8 +137,6 @@ class SuppressionGain { // echo spectrum. const bool use_unbounded_echo_spectrum_; std::unique_ptr dominant_nearend_detector_; - - RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionGain); }; } // namespace webrtc -- cgit v1.2.3