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

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

Issue 3005433002: Fix places that trigger no-unused-lambda-capture (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
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 43cc901f006aa3aa1999a3c894898b06b34da736..09347e832447f9044c39d6ad854c9d59d157f992 100644
--- a/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
+++ b/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
@@ -507,7 +507,7 @@ void AdaptiveFirFilter::Constrain() {
std::array<float, kFftLength> h;
fft_.Ifft(H_[partition_to_constrain_], &h);
- constexpr float kScale = 1.0f / kFftLengthBy2;
+ const float kScale = 1.0f / kFftLengthBy2;
nisse-webrtc 2017/08/23 09:42:02 Could add a comment here too, on why constexpr doe
eladalon 2017/08/23 11:42:53 IMHO, it would be overkill to fill the code with t
std::for_each(h.begin(), h.begin() + kFftLengthBy2,
[kScale](float& a) { a *= kScale; });
kwiberg-webrtc 2017/08/23 11:35:59 Does it work if you change the capture list to [&]
eladalon 2017/08/23 11:42:53 You can't capture a constexpr by reference, can yo
kwiberg-webrtc 2017/08/23 11:56:40 Yes, you can. Unlike preprocessor constants and en
eladalon 2017/08/23 12:17:30 Surprising, but OK. Nevertheless, I am not sure th
std::fill(h.begin() + kFftLengthBy2, h.end(), 0.f);
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc » ('j') | webrtc/pc/channel_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698