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

Unified Diff: webrtc/modules/utility/source/audio_frame_operations_unittest.cc

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/modules/utility/source/audio_frame_operations_unittest.cc
diff --git a/webrtc/modules/utility/source/audio_frame_operations_unittest.cc b/webrtc/modules/utility/source/audio_frame_operations_unittest.cc
index f4d881cf8710f68bd506c36415fd68e753b9676e..c278cdddcdcd7b4edbd84a19f03ad98c8761f3cb 100644
--- a/webrtc/modules/utility/source/audio_frame_operations_unittest.cc
+++ b/webrtc/modules/utility/source/audio_frame_operations_unittest.cc
@@ -28,14 +28,14 @@ class AudioFrameOperationsTest : public ::testing::Test {
};
void SetFrameData(AudioFrame* frame, int16_t left, int16_t right) {
- for (int i = 0; i < frame->samples_per_channel_ * 2; i += 2) {
+ for (size_t i = 0; i < frame->samples_per_channel_ * 2; i += 2) {
frame->data_[i] = left;
frame->data_[i + 1] = right;
}
}
void SetFrameData(AudioFrame* frame, int16_t data) {
- for (int i = 0; i < frame->samples_per_channel_; i++) {
+ for (size_t i = 0; i < frame->samples_per_channel_; i++) {
frame->data_[i] = data;
}
}
@@ -45,7 +45,7 @@ void VerifyFramesAreEqual(const AudioFrame& frame1, const AudioFrame& frame2) {
EXPECT_EQ(frame1.samples_per_channel_,
frame2.samples_per_channel_);
- for (int i = 0; i < frame1.samples_per_channel_ * frame1.num_channels_;
+ for (size_t i = 0; i < frame1.samples_per_channel_ * frame1.num_channels_;
i++) {
EXPECT_EQ(frame1.data_[i], frame2.data_[i]);
}
« no previous file with comments | « webrtc/modules/utility/source/audio_frame_operations.cc ('k') | webrtc/modules/utility/source/file_player_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698