AcmReceiver: Make a member variable const
This is a minor clean-up made possible by simplifications done in the
past.
Bug: none
Change-Id: Id0ea167572f8da36db5de949441f67a2a18555be
Reviewed-on: https://chromium-review.googlesource.com/528073
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18490}
diff --git a/webrtc/modules/audio_coding/acm2/acm_receiver.cc b/webrtc/modules/audio_coding/acm2/acm_receiver.cc
index 2eacefd..553265e 100644
--- a/webrtc/modules/audio_coding/acm2/acm_receiver.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.cc
@@ -37,7 +37,7 @@
neteq_(NetEq::Create(config.neteq_config, config.decoder_factory)),
clock_(config.clock),
resampled_last_output_frame_(true) {
- assert(clock_);
+ RTC_DCHECK(clock_);
memset(last_audio_buffer_.get(), 0, AudioFrame::kMaxDataSizeSamples);
}
diff --git a/webrtc/modules/audio_coding/acm2/acm_receiver.h b/webrtc/modules/audio_coding/acm2/acm_receiver.h
index 8f0963f..87190c6 100644
--- a/webrtc/modules/audio_coding/acm2/acm_receiver.h
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.h
@@ -282,7 +282,7 @@
std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_);
CallStatistics call_stats_ GUARDED_BY(crit_sect_);
NetEq* neteq_;
- Clock* clock_; // TODO(henrik.lundin) Make const if possible.
+ const Clock* const clock_;
bool resampled_last_output_frame_ GUARDED_BY(crit_sect_);
rtc::Optional<int> last_packet_sample_rate_hz_ GUARDED_BY(crit_sect_);
};