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}
This commit is contained in:
Oskar Sundbom
2017-11-17 14:34:48 +01:00
committed by Commit Bot
parent 28dfeb7f24
commit aa8b67da9d
27 changed files with 124 additions and 147 deletions

View File

@ -69,7 +69,7 @@ TEST(RenderSignalAnalyzer, NoFalseDetectionOfNarrowBands) {
RandomizeSampleVector(&random_generator, x[0]);
fft.PaddedFft(x[0], x_old, &X);
render_buffer.Insert(x);
analyzer.Update(render_buffer, rtc::Optional<size_t>(0));
analyzer.Update(render_buffer, 0);
}
mask.fill(1.f);
@ -99,7 +99,7 @@ TEST(RenderSignalAnalyzer, NarrowBandDetection) {
&sample_counter, x[0]);
render_buffer.Insert(x);
analyzer.Update(render_buffer, known_delay ? rtc::Optional<size_t>(0)
: rtc::Optional<size_t>());
: rtc::nullopt);
}
};