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}
diff --git a/modules/audio_coding/neteq/dtmf_buffer.cc b/modules/audio_coding/neteq/dtmf_buffer.cc
index 370de42..656cff9 100644
--- a/modules/audio_coding/neteq/dtmf_buffer.cc
+++ b/modules/audio_coding/neteq/dtmf_buffer.cc
@@ -98,9 +98,8 @@
// already in the buffer. If so, the new event is simply merged with the
// existing one.
int DtmfBuffer::InsertEvent(const DtmfEvent& event) {
- if (event.event_no < 0 || event.event_no > 15 ||
- event.volume < 0 || event.volume > 63 ||
- event.duration <= 0 || event.duration > 65535) {
+ if (event.event_no < 0 || event.event_no > 15 || event.volume < 0 ||
+ event.volume > 63 || event.duration <= 0 || event.duration > 65535) {
RTC_LOG(LS_WARNING) << "InsertEvent invalid parameters";
return kInvalidEventParameters;
}
@@ -142,8 +141,8 @@
#endif
}
}
- if (current_timestamp >= it->timestamp
- && current_timestamp <= event_end) { // TODO(hlundin): Change to <.
+ if (current_timestamp >= it->timestamp &&
+ current_timestamp <= event_end) { // TODO(hlundin): Change to <.
// Found a matching event.
if (event) {
event->event_no = it->event_no;
@@ -153,16 +152,15 @@
event->timestamp = it->timestamp;
}
#ifdef LEGACY_BITEXACT
- if (it->end_bit &&
- current_timestamp + frame_len_samples_ >= event_end) {
+ if (it->end_bit && current_timestamp + frame_len_samples_ >= event_end) {
// We are done playing this. Erase the event.
buffer_.erase(it);
}
#endif
return true;
} else if (current_timestamp > event_end) { // TODO(hlundin): Change to >=.
- // Erase old event. Operation returns a valid pointer to the next element
- // in the list.
+// Erase old event. Operation returns a valid pointer to the next element
+// in the list.
#ifdef LEGACY_BITEXACT
if (!next_available) {
if (event) {
@@ -196,10 +194,7 @@
}
int DtmfBuffer::SetSampleRate(int fs_hz) {
- if (fs_hz != 8000 &&
- fs_hz != 16000 &&
- fs_hz != 32000 &&
- fs_hz != 48000) {
+ if (fs_hz != 8000 && fs_hz != 16000 && fs_hz != 32000 && fs_hz != 48000) {
return kInvalidSampleRate;
}
max_extrapolation_samples_ = 7 * fs_hz / 100;