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

Unified Diff: webrtc/modules/audio_coding/neteq/time_stretch.cc

Issue 2714063002: Introduce dchecked_cast, and start using it (Closed)
Patch Set: Created 3 years, 10 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_coding/neteq/time_stretch.cc
diff --git a/webrtc/modules/audio_coding/neteq/time_stretch.cc b/webrtc/modules/audio_coding/neteq/time_stretch.cc
index 880b1f82ea595271ee0f92795f8a39542e5039f4..28feadcb5c46dd4162e3743082ab012d8199f434 100644
--- a/webrtc/modules/audio_coding/neteq/time_stretch.cc
+++ b/webrtc/modules/audio_coding/neteq/time_stretch.cc
@@ -194,7 +194,7 @@ bool TimeStretch::SpeechDetection(int32_t vec1_energy, int32_t vec2_energy,
right_scale = std::max(0, right_scale);
left_side = left_side >> right_scale;
right_side =
- rtc::checked_cast<int32_t>(peak_index) * (right_side >> right_scale);
+ rtc::dchecked_cast<int32_t>(peak_index) * (right_side >> right_scale);
// Scale |left_side| properly before comparing with |right_side|.
// (|scaling| is the scale factor before energy calculation, thus the scale

Powered by Google App Engine
This is Rietveld 408576698