Optional: Use nullopt and implicit construction in /modules/audio_processing
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.
This CL was uploaded by git cl split.
R=henrik.lundin@webrtc.org
Bug: None
Change-Id: I733a83f702fe11884d229a1713cfac952727bde8
Reviewed-on: https://webrtc-review.googlesource.com/23601
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20786}
diff --git a/modules/audio_processing/level_controller/level_controller.cc b/modules/audio_processing/level_controller/level_controller.cc
index 6343ef7..521f82e 100644
--- a/modules/audio_processing/level_controller/level_controller.cc
+++ b/modules/audio_processing/level_controller/level_controller.cc
@@ -202,7 +202,7 @@
metrics_.Initialize(sample_rate_hz);
last_gain_ = 1.0f;
- sample_rate_hz_ = rtc::Optional<int>(sample_rate_hz);
+ sample_rate_hz_ = sample_rate_hz;
dc_forgetting_factor_ = 0.01f * sample_rate_hz / 48000.f;
std::fill(dc_level_, dc_level_ + arraysize(dc_level_), 0.f);
}