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

Unified Diff: webrtc/common_audio/signal_processing/spl_sqrt.c

Issue 2274083002: Replace calls to assert() with RTC_DCHECK_*() in .c code (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 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/common_audio/signal_processing/spl_sqrt.c
diff --git a/webrtc/common_audio/signal_processing/spl_sqrt.c b/webrtc/common_audio/signal_processing/spl_sqrt.c
index 579e714a1104b965ebdb5065324a08a24637c4f8..511039b6507d36cc913bc2a86138c63a8a31dab5 100644
--- a/webrtc/common_audio/signal_processing/spl_sqrt.c
+++ b/webrtc/common_audio/signal_processing/spl_sqrt.c
@@ -15,10 +15,9 @@
*
*/
+#include "webrtc/base/checks.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include <assert.h>
-
int32_t WebRtcSpl_SqrtLocal(int32_t in);
int32_t WebRtcSpl_SqrtLocal(int32_t in)
@@ -166,7 +165,7 @@ int32_t WebRtcSpl_Sqrt(int32_t value)
x_norm = (int16_t)(A >> 16); // x_norm = AH
nshift = (sh / 2);
- assert(nshift >= 0);
+ RTC_DCHECK_GE(nshift, 0);
A = (int32_t)WEBRTC_SPL_LSHIFT_W32((int32_t)x_norm, 16);
A = WEBRTC_SPL_ABS_W32(A); // A = abs(x_norm<<16)

Powered by Google App Engine
This is Rietveld 408576698