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:
committed by
Commit Bot
parent
28dfeb7f24
commit
aa8b67da9d
@ -54,7 +54,7 @@ void RmsLevel::Reset() {
|
||||
sum_square_ = 0.f;
|
||||
sample_count_ = 0;
|
||||
max_sum_square_ = 0.f;
|
||||
block_size_ = rtc::Optional<size_t>();
|
||||
block_size_ = rtc::nullopt;
|
||||
}
|
||||
|
||||
void RmsLevel::Analyze(rtc::ArrayView<const int16_t> data) {
|
||||
@ -99,9 +99,9 @@ RmsLevel::Levels RmsLevel::AverageAndPeak() {
|
||||
}
|
||||
|
||||
void RmsLevel::CheckBlockSize(size_t block_size) {
|
||||
if (block_size_ != rtc::Optional<size_t>(block_size)) {
|
||||
if (block_size_ != block_size) {
|
||||
Reset();
|
||||
block_size_ = rtc::Optional<size_t>(block_size);
|
||||
block_size_ = block_size;
|
||||
}
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user