From 6229d92a52f9640948506a1752d4f927caea6d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Wed, 11 Oct 2017 10:06:59 +0200 Subject: [PATCH] Removed redundant max operation and corrected comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:8379 Change-Id: I20d0d469a8cc465ca45c18bfde8bbc945cb00e74 Reviewed-on: https://webrtc-review.googlesource.com/8303 Reviewed-by: Gustaf Ullberg Commit-Queue: Per Ã…hgren Cr-Commit-Position: refs/heads/master@{#20242} --- .../audio_processing/aec3/matched_filter_lag_aggregator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc b/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc index d1336199b1..7c8ccb4df7 100644 --- a/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc +++ b/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc @@ -32,13 +32,13 @@ void MatchedFilterLagAggregator::Reset() { rtc::Optional MatchedFilterLagAggregator::Aggregate( rtc::ArrayView lag_estimates) { - // hoose the strongest lag estimate as the best one. + // Choose the strongest lag estimate as the best one. float best_accuracy = 0.f; int best_lag_estimate_index = -1; for (size_t k = 0; k < lag_estimates.size(); ++k) { if (lag_estimates[k].updated && lag_estimates[k].reliable) { if (lag_estimates[k].accuracy > best_accuracy) { - best_accuracy = std::max(0.f, lag_estimates[k].accuracy); + best_accuracy = lag_estimates[k].accuracy; best_lag_estimate_index = static_cast(k); } }