Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc

Issue 3003723002: Fix places that trigger no-unused-lambda-capture - change to using static-constexpr (Closed)
Patch Set: Rebased Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
diff --git a/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc b/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
index 09347e832447f9044c39d6ad854c9d59d157f992..303ff7735d93275ab8428848014903ad0f62085a 100644
--- a/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
+++ b/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
@@ -507,9 +507,9 @@ void AdaptiveFirFilter::Constrain() {
std::array<float, kFftLength> h;
fft_.Ifft(H_[partition_to_constrain_], &h);
- const float kScale = 1.0f / kFftLengthBy2;
+ static constexpr float kScale = 1.0f / kFftLengthBy2;
std::for_each(h.begin(), h.begin() + kFftLengthBy2,
- [kScale](float& a) { a *= kScale; });
+ [](float& a) { a *= kScale; });
std::fill(h.begin() + kFftLengthBy2, h.end(), 0.f);
std::copy(h.begin(), h.begin() + kFftLengthBy2,
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698