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

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

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 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/copy_set_operations.c
diff --git a/webrtc/common_audio/signal_processing/copy_set_operations.c b/webrtc/common_audio/signal_processing/copy_set_operations.c
index 84d3bc429ce6720820b8de3a55641aa85c9c3924..9d7cf47e3b55d928fe346c2b4da1a23910a61c36 100644
--- a/webrtc/common_audio/signal_processing/copy_set_operations.c
+++ b/webrtc/common_audio/signal_processing/copy_set_operations.c
@@ -26,9 +26,9 @@
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-void WebRtcSpl_MemSetW16(int16_t *ptr, int16_t set_value, int length)
+void WebRtcSpl_MemSetW16(int16_t *ptr, int16_t set_value, size_t length)
{
- int j;
+ size_t j;
int16_t *arrptr = ptr;
for (j = length; j > 0; j--)
@@ -37,9 +37,9 @@ void WebRtcSpl_MemSetW16(int16_t *ptr, int16_t set_value, int length)
}
}
-void WebRtcSpl_MemSetW32(int32_t *ptr, int32_t set_value, int length)
+void WebRtcSpl_MemSetW32(int32_t *ptr, int32_t set_value, size_t length)
{
- int j;
+ size_t j;
int32_t *arrptr = ptr;
for (j = length; j > 0; j--)
@@ -48,9 +48,11 @@ void WebRtcSpl_MemSetW32(int32_t *ptr, int32_t set_value, int length)
}
}
-void WebRtcSpl_MemCpyReversedOrder(int16_t* dest, int16_t* source, int length)
+void WebRtcSpl_MemCpyReversedOrder(int16_t* dest,
+ int16_t* source,
+ size_t length)
{
- int j;
+ size_t j;
int16_t* destPtr = dest;
int16_t* sourcePtr = source;
@@ -61,20 +63,20 @@ void WebRtcSpl_MemCpyReversedOrder(int16_t* dest, int16_t* source, int length)
}
void WebRtcSpl_CopyFromEndW16(const int16_t *vector_in,
- int length,
- int samples,
+ size_t length,
+ size_t samples,
int16_t *vector_out)
{
// Copy the last <samples> of the input vector to vector_out
WEBRTC_SPL_MEMCPY_W16(vector_out, &vector_in[length - samples], samples);
}
-void WebRtcSpl_ZerosArrayW16(int16_t *vector, int length)
+void WebRtcSpl_ZerosArrayW16(int16_t *vector, size_t length)
{
WebRtcSpl_MemSetW16(vector, 0, length);
}
-void WebRtcSpl_ZerosArrayW32(int32_t *vector, int length)
+void WebRtcSpl_ZerosArrayW32(int32_t *vector, size_t length)
{
WebRtcSpl_MemSetW32(vector, 0, length);
}
« no previous file with comments | « webrtc/common_audio/signal_processing/complex_fft.c ('k') | webrtc/common_audio/signal_processing/cross_correlation.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698