diff options
author | Jonas Olsson <jonasolsson@webrtc.org> | 2019-07-05 19:08:33 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-08 13:45:15 +0000 |
commit | a4d873786f10eedd72de25ad0d94ad7c53c1f68a (patch) | |
tree | 962ed681b560cc929c3521fc50fdded8fd88860d /common_audio | |
parent | c93bfcfd2f7613a1f8fa26b567de327db3548c7f (diff) | |
download | webrtc-a4d873786f10eedd72de25ad0d94ad7c53c1f68a.tar.gz |
Format almost everything.
This CL was generated by running
git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format
Most of these changes are clang-format grouping and reordering includes
differently.
Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
Diffstat (limited to 'common_audio')
30 files changed, 43 insertions, 17 deletions
diff --git a/common_audio/audio_converter.h b/common_audio/audio_converter.h index 73ad1ef8d7..481ac086b7 100644 --- a/common_audio/audio_converter.h +++ b/common_audio/audio_converter.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_AUDIO_CONVERTER_H_ #include <stddef.h> + #include <memory> #include "rtc_base/constructor_magic.h" diff --git a/common_audio/audio_converter_unittest.cc b/common_audio/audio_converter_unittest.cc index b99d825c2b..9f49497bc3 100644 --- a/common_audio/audio_converter_unittest.cc +++ b/common_audio/audio_converter_unittest.cc @@ -8,12 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "common_audio/audio_converter.h" + #include <algorithm> #include <cmath> #include <memory> #include <vector> -#include "common_audio/audio_converter.h" #include "common_audio/channel_buffer.h" #include "common_audio/resampler/push_sinc_resampler.h" #include "rtc_base/arraysize.h" diff --git a/common_audio/channel_buffer.h b/common_audio/channel_buffer.h index 3f9ba9c0e1..dc44369be6 100644 --- a/common_audio/channel_buffer.h +++ b/common_audio/channel_buffer.h @@ -131,8 +131,8 @@ class ChannelBuffer { private: std::unique_ptr<T[]> data_; - std::unique_ptr<T* []> channels_; - std::unique_ptr<T* []> bands_; + std::unique_ptr<T*[]> channels_; + std::unique_ptr<T*[]> bands_; const size_t num_frames_; const size_t num_frames_per_band_; // Number of channels the internal buffer holds. diff --git a/common_audio/channel_buffer_unittest.cc b/common_audio/channel_buffer_unittest.cc index 196f87f717..7d45e7cde9 100644 --- a/common_audio/channel_buffer_unittest.cc +++ b/common_audio/channel_buffer_unittest.cc @@ -9,6 +9,7 @@ */ #include "common_audio/channel_buffer.h" + #include "test/gtest.h" namespace webrtc { diff --git a/common_audio/fir_filter_c.cc b/common_audio/fir_filter_c.cc index b6ec27ad26..3f1fa09b51 100644 --- a/common_audio/fir_filter_c.cc +++ b/common_audio/fir_filter_c.cc @@ -11,6 +11,7 @@ #include "common_audio/fir_filter_c.h" #include <string.h> + #include <memory> #include "rtc_base/checks.h" diff --git a/common_audio/fir_filter_c.h b/common_audio/fir_filter_c.h index d263e1ba60..b2ae4c3217 100644 --- a/common_audio/fir_filter_c.h +++ b/common_audio/fir_filter_c.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_FIR_FILTER_C_H_ #include <string.h> + #include <memory> #include "common_audio/fir_filter.h" diff --git a/common_audio/fir_filter_sse.h b/common_audio/fir_filter_sse.h index b768a37aa1..32f4945acc 100644 --- a/common_audio/fir_filter_sse.h +++ b/common_audio/fir_filter_sse.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_FIR_FILTER_SSE_H_ #include <stddef.h> + #include <memory> #include "common_audio/fir_filter.h" diff --git a/common_audio/fir_filter_unittest.cc b/common_audio/fir_filter_unittest.cc index 07abf2094f..5c5880b5eb 100644 --- a/common_audio/fir_filter_unittest.cc +++ b/common_audio/fir_filter_unittest.cc @@ -9,12 +9,12 @@ */ #include "common_audio/fir_filter.h" -#include "common_audio/fir_filter_factory.h" #include <string.h> #include <memory> +#include "common_audio/fir_filter_factory.h" #include "test/gtest.h" namespace webrtc { diff --git a/common_audio/include/audio_util.h b/common_audio/include/audio_util.h index bca5718044..50c9cf282c 100644 --- a/common_audio/include/audio_util.h +++ b/common_audio/include/audio_util.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_INCLUDE_AUDIO_UTIL_H_ #include <stdint.h> + #include <algorithm> #include <cmath> #include <cstring> diff --git a/common_audio/real_fourier.h b/common_audio/real_fourier.h index 4d0d8bf38e..4881fb7f8b 100644 --- a/common_audio/real_fourier.h +++ b/common_audio/real_fourier.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_REAL_FOURIER_H_ #include <stddef.h> + #include <complex> #include <memory> diff --git a/common_audio/real_fourier_ooura.h b/common_audio/real_fourier_ooura.h index b36c84f10b..b5f1bcff5d 100644 --- a/common_audio/real_fourier_ooura.h +++ b/common_audio/real_fourier_ooura.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_REAL_FOURIER_OOURA_H_ #include <stddef.h> + #include <complex> #include <memory> diff --git a/common_audio/resampler/push_resampler_unittest.cc b/common_audio/resampler/push_resampler_unittest.cc index 3a1d5c551a..8b0d5485b6 100644 --- a/common_audio/resampler/push_resampler_unittest.cc +++ b/common_audio/resampler/push_resampler_unittest.cc @@ -9,6 +9,7 @@ */ #include "common_audio/resampler/include/push_resampler.h" + #include "rtc_base/checks.h" // RTC_DCHECK_IS_ON #include "test/gtest.h" diff --git a/common_audio/resampler/push_sinc_resampler.h b/common_audio/resampler/push_sinc_resampler.h index b002ff748c..bd609c4437 100644 --- a/common_audio/resampler/push_sinc_resampler.h +++ b/common_audio/resampler/push_sinc_resampler.h @@ -13,6 +13,7 @@ #include <stddef.h> #include <stdint.h> + #include <memory> #include "common_audio/resampler/sinc_resampler.h" diff --git a/common_audio/resampler/push_sinc_resampler_unittest.cc b/common_audio/resampler/push_sinc_resampler_unittest.cc index ee111c4c6a..1a25a8c3e8 100644 --- a/common_audio/resampler/push_sinc_resampler_unittest.cc +++ b/common_audio/resampler/push_sinc_resampler_unittest.cc @@ -8,13 +8,14 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "common_audio/resampler/push_sinc_resampler.h" + #include <algorithm> #include <cmath> #include <cstring> #include <memory> #include "common_audio/include/audio_util.h" -#include "common_audio/resampler/push_sinc_resampler.h" #include "common_audio/resampler/sinusoidal_linear_chirp_source.h" #include "rtc_base/time_utils.h" #include "test/gmock.h" diff --git a/common_audio/resampler/resampler.cc b/common_audio/resampler/resampler.cc index e4d2aa2b61..ce38ef56de 100644 --- a/common_audio/resampler/resampler.cc +++ b/common_audio/resampler/resampler.cc @@ -12,11 +12,12 @@ * A wrapper for resampling a numerous amount of sampling combinations. */ +#include "common_audio/resampler/include/resampler.h" + #include <stdint.h> #include <stdlib.h> #include <string.h> -#include "common_audio/resampler/include/resampler.h" #include "common_audio/signal_processing/include/signal_processing_library.h" #include "rtc_base/logging.h" diff --git a/common_audio/resampler/resampler_unittest.cc b/common_audio/resampler/resampler_unittest.cc index 08a7479f3e..1b90d3e30b 100644 --- a/common_audio/resampler/resampler_unittest.cc +++ b/common_audio/resampler/resampler_unittest.cc @@ -8,9 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "common_audio/resampler/include/resampler.h" + #include <array> -#include "common_audio/resampler/include/resampler.h" #include "rtc_base/strings/string_builder.h" #include "test/gtest.h" diff --git a/common_audio/resampler/sinc_resampler.cc b/common_audio/resampler/sinc_resampler.cc index 4601514030..21707e9e4e 100644 --- a/common_audio/resampler/sinc_resampler.cc +++ b/common_audio/resampler/sinc_resampler.cc @@ -90,6 +90,7 @@ #include <math.h> #include <stdint.h> #include <string.h> + #include <limits> #include "rtc_base/checks.h" diff --git a/common_audio/resampler/sinc_resampler.h b/common_audio/resampler/sinc_resampler.h index ffd70d9ce8..5181c18dac 100644 --- a/common_audio/resampler/sinc_resampler.h +++ b/common_audio/resampler/sinc_resampler.h @@ -15,6 +15,7 @@ #define COMMON_AUDIO_RESAMPLER_SINC_RESAMPLER_H_ #include <stddef.h> + #include <memory> #include "rtc_base/constructor_magic.h" diff --git a/common_audio/resampler/sinc_resampler_neon.cc b/common_audio/resampler/sinc_resampler_neon.cc index 3649324d12..9ee918bca3 100644 --- a/common_audio/resampler/sinc_resampler_neon.cc +++ b/common_audio/resampler/sinc_resampler_neon.cc @@ -11,10 +11,10 @@ // Modified from the Chromium original: // src/media/base/sinc_resampler.cc -#include "common_audio/resampler/sinc_resampler.h" - #include <arm_neon.h> +#include "common_audio/resampler/sinc_resampler.h" + namespace webrtc { float SincResampler::Convolve_NEON(const float* input_ptr, diff --git a/common_audio/resampler/sinc_resampler_unittest.cc b/common_audio/resampler/sinc_resampler_unittest.cc index 0aa3c91c53..7bcd7f146e 100644 --- a/common_audio/resampler/sinc_resampler_unittest.cc +++ b/common_audio/resampler/sinc_resampler_unittest.cc @@ -14,13 +14,14 @@ // MSVC++ requires this to be set before any other includes to get M_PI. #define _USE_MATH_DEFINES +#include "common_audio/resampler/sinc_resampler.h" + #include <math.h> #include <algorithm> #include <memory> #include <tuple> -#include "common_audio/resampler/sinc_resampler.h" #include "common_audio/resampler/sinusoidal_linear_chirp_source.h" #include "rtc_base/stringize_macros.h" #include "rtc_base/system/arch.h" diff --git a/common_audio/signal_processing/include/signal_processing_library.h b/common_audio/signal_processing/include/signal_processing_library.h index 4e8bf4f94f..4ad92c4c2b 100644 --- a/common_audio/signal_processing/include/signal_processing_library.h +++ b/common_audio/signal_processing/include/signal_processing_library.h @@ -18,6 +18,7 @@ #define COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_SIGNAL_PROCESSING_LIBRARY_H_ #include <string.h> + #include "common_audio/signal_processing/dot_product_with_scale.h" // Macros specific for the fixed point implementation diff --git a/common_audio/signal_processing/real_fft_unittest.cc b/common_audio/signal_processing/real_fft_unittest.cc index 73fcb16846..7cabe7d9fe 100644 --- a/common_audio/signal_processing/real_fft_unittest.cc +++ b/common_audio/signal_processing/real_fft_unittest.cc @@ -9,6 +9,7 @@ */ #include "common_audio/signal_processing/include/real_fft.h" + #include "common_audio/signal_processing/include/signal_processing_library.h" #include "test/gtest.h" diff --git a/common_audio/smoothing_filter.cc b/common_audio/smoothing_filter.cc index 422eaebd14..961f4a142e 100644 --- a/common_audio/smoothing_filter.cc +++ b/common_audio/smoothing_filter.cc @@ -11,6 +11,7 @@ #include "common_audio/smoothing_filter.h" #include <math.h> + #include <cmath> #include "rtc_base/checks.h" diff --git a/common_audio/smoothing_filter_unittest.cc b/common_audio/smoothing_filter_unittest.cc index caf9943700..8b311d1498 100644 --- a/common_audio/smoothing_filter_unittest.cc +++ b/common_audio/smoothing_filter_unittest.cc @@ -8,10 +8,11 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "common_audio/smoothing_filter.h" + #include <cmath> #include <memory> -#include "common_audio/smoothing_filter.h" #include "rtc_base/fake_clock.h" #include "test/gtest.h" diff --git a/common_audio/sparse_fir_filter_unittest.cc b/common_audio/sparse_fir_filter_unittest.cc index b6cd6f9d9b..5dc7b6dc6f 100644 --- a/common_audio/sparse_fir_filter_unittest.cc +++ b/common_audio/sparse_fir_filter_unittest.cc @@ -8,10 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include <memory> - #include "common_audio/sparse_fir_filter.h" +#include <memory> + #include "common_audio/fir_filter.h" #include "common_audio/fir_filter_factory.h" #include "rtc_base/arraysize.h" diff --git a/common_audio/third_party/fft4g/fft4g.h b/common_audio/third_party/fft4g/fft4g.h index f1f31a182d..0820b6e908 100644 --- a/common_audio/third_party/fft4g/fft4g.h +++ b/common_audio/third_party/fft4g/fft4g.h @@ -22,4 +22,4 @@ void WebRtc_rdft(size_t n, int isgn, float* a, size_t* ip, float* w); } #endif -#endif /* COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ */ +#endif /* COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ */ diff --git a/common_audio/wav_file.cc b/common_audio/wav_file.cc index da1a899b3b..3f2aa7e50f 100644 --- a/common_audio/wav_file.cc +++ b/common_audio/wav_file.cc @@ -11,6 +11,7 @@ #include "common_audio/wav_file.h" #include <errno.h> + #include <algorithm> #include <cstdio> #include <type_traits> diff --git a/common_audio/wav_file.h b/common_audio/wav_file.h index a808b0d86b..e071499579 100644 --- a/common_audio/wav_file.h +++ b/common_audio/wav_file.h @@ -12,6 +12,7 @@ #define COMMON_AUDIO_WAV_FILE_H_ #include <stdint.h> + #include <cstddef> #include <string> @@ -94,7 +95,7 @@ class WavReader final : public WavFile { size_t num_channels_; size_t num_samples_; // Total number of samples in the file. size_t num_samples_remaining_; - FILE* file_handle_; // Input file, owned by this class. + FILE* file_handle_; // Input file, owned by this class. fpos_t data_start_pos_; // Position in the file immediately after WAV header. RTC_DISALLOW_COPY_AND_ASSIGN(WavReader); diff --git a/common_audio/wav_file_unittest.cc b/common_audio/wav_file_unittest.cc index bf03b1cfb3..01c920cdf1 100644 --- a/common_audio/wav_file_unittest.cc +++ b/common_audio/wav_file_unittest.cc @@ -11,10 +11,11 @@ // MSVC++ requires this to be set before any other includes to get M_PI. #define _USE_MATH_DEFINES +#include "common_audio/wav_file.h" + #include <cmath> #include <limits> -#include "common_audio/wav_file.h" #include "common_audio/wav_header.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" diff --git a/common_audio/wav_header_unittest.cc b/common_audio/wav_header_unittest.cc index 8276e5906a..0dc3300c73 100644 --- a/common_audio/wav_header_unittest.cc +++ b/common_audio/wav_header_unittest.cc @@ -8,10 +8,12 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "common_audio/wav_header.h" + #include <string.h> + #include <limits> -#include "common_audio/wav_header.h" #include "test/gtest.h" namespace webrtc { |