Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -30,9 +30,7 @@ class AudioVectorTest : public ::testing::Test {
|
||||
}
|
||||
}
|
||||
|
||||
size_t array_length() const {
|
||||
return sizeof(array_) / sizeof(array_[0]);
|
||||
}
|
||||
size_t array_length() const { return sizeof(array_) / sizeof(array_[0]); }
|
||||
|
||||
int16_t array_[10];
|
||||
};
|
||||
@ -283,8 +281,8 @@ TEST_F(AudioVectorTest, InsertBeyondEnd) {
|
||||
for (int i = 0; i < kNewLength; ++i) {
|
||||
new_array[i] = 100 + i;
|
||||
}
|
||||
int insert_position = rtc::checked_cast<int>(
|
||||
array_length() + 10); // Too large.
|
||||
int insert_position =
|
||||
rtc::checked_cast<int>(array_length() + 10); // Too large.
|
||||
vec.InsertAt(new_array, kNewLength, insert_position);
|
||||
// Verify that the vector looks as follows:
|
||||
// {0, 1, ..., kLength - 1, 100, 101, ..., 100 + kNewLength - 1 }.
|
||||
@ -375,7 +373,7 @@ TEST_F(AudioVectorTest, CrossFade) {
|
||||
EXPECT_EQ(0, vec1[i]);
|
||||
}
|
||||
// Check mixing zone.
|
||||
for (size_t i = 0 ; i < kFadeLength; ++i) {
|
||||
for (size_t i = 0; i < kFadeLength; ++i) {
|
||||
EXPECT_NEAR((i + 1) * 100 / (kFadeLength + 1),
|
||||
vec1[kLength - kFadeLength + i], 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user