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

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed)

Created:
5 years, 6 months ago by Peter Kasting
Modified:
5 years, 6 months ago
CC:
aluebs-webrtc, Andrew MacDonald, bjornv1, hlundin-webrtc, kwiberg-webrtc, mflodman, stefan-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Reformat existing code. There should be no functional effects. This includes changes like: * Attempt to break lines at better positions * Use "override" in more places, don't use "virtual" with it * Use {} where the body is more than one line * Make declaration and definition arg names match * Eliminate unused code * EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT) * Correct #include order * Use anonymous namespaces in preference to "static" for file-scoping * Eliminate unnecessary casts * Update reference code in comments of ARM assembly sources to match actual current C code * Fix indenting to be more style-guide compliant * Use arraysize() in more places * Use bool instead of int for "boolean" values (0/1) * Shorten and simplify code * Spaces around operators * 80 column limit * Use const more consistently * Space goes after '*' in type name, not before * Remove unnecessary return values * Use "(var == const)", not "(const == var)" * Spelling * Prefer true, typed constants to "enum hack" constants * Avoid "virtual" on non-overridden functions * ASSERT(x == y) -> ASSERT_EQ(y, x) BUG=none R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/728d9037c016c01295177fa700fc7927f0bb80bb

Patch Set 1 #

Total comments: 18

Patch Set 2 : Review comments + resync #

Patch Set 3 : Resync #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+419 lines, -493 lines) Patch
M talk/app/webrtc/test/fakeaudiocapturemodule.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc View 1 2 2 chunks +18 lines, -18 lines 0 comments Download
M webrtc/common_audio/audio_ring_buffer_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M webrtc/common_audio/blocker.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/common_audio/fft4g.h View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/common_audio/fft4g.c View 1 2 5 chunks +6 lines, -2 lines 0 comments Download
M webrtc/common_audio/lapped_transform_unittest.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M webrtc/common_audio/real_fourier_unittest.cc View 1 chunk +12 lines, -12 lines 0 comments Download
M webrtc/common_audio/resampler/resampler.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/common_audio/resampler/sinc_resampler.cc View 1 3 chunks +7 lines, -3 lines 0 comments Download
M webrtc/common_audio/signal_processing/energy.c View 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S View 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/common_audio/signal_processing/include/signal_processing_library.h View 1 2 1 chunk +3 lines, -6 lines 0 comments Download
M webrtc/common_audio/signal_processing/resample_fractional.c View 3 chunks +3 lines, -6 lines 0 comments Download
M webrtc/common_audio/signal_processing/signal_processing_unittest.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M webrtc/common_audio/vad/vad_unittest.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g711/g711_interface.c View 1 chunk +0 lines, -7 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g711/include/g711_interface.h View 1 chunk +0 lines, -17 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g711/test/testG711.cc View 1 3 chunks +10 lines, -15 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g722/g722_interface.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/g722/test/testG722.cc View 1 4 chunks +14 lines, -18 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/abs_quant_loop.c View 3 chunks +1 line, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/cb_search.c View 1 2 3 chunks +11 lines, -5 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/decode.c View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/my_corr.h View 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/my_corr.c View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c View 1 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c View 1 2 3 chunks +5 lines, -9 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/ilbc/xcorr_coef.c View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c View 1 2 4 chunks +8 lines, -14 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c View 1 2 6 chunks +16 lines, -18 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c View 1 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/lattice_armv7.S View 1 1 chunk +4 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c View 1 1 chunk +0 lines, -13 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.h View 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c View 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/acm_receive_test.h View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/acm_receive_test.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/main/test/opus_test.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/decision_logic_normal.h View 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/expand.h View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/expand.cc View 1 2 5 chunks +16 lines, -16 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/merge.cc View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.cc View 1 2 2 chunks +8 lines, -5 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/packet_buffer.cc View 1 chunk +4 lines, -8 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/preemptive_expand.h View 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/statistics_calculator.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/test/RTPencode.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/constant_pcm_packet_source.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_device/android/audio_common.h View 1 chunk +0 lines, -1 line 0 comments Download
M webrtc/modules/audio_device/audio_device_buffer.cc View 1 2 2 chunks +3 lines, -8 lines 0 comments Download
M webrtc/modules/audio_device/test/audio_device_test_api.cc View 3 chunks +37 lines, -39 lines 0 comments Download
M webrtc/modules/audio_device/test/func_test_manager.h View 1 chunk +41 lines, -42 lines 0 comments Download
M webrtc/modules/audio_device/test/func_test_manager.cc View 4 chunks +10 lines, -16 lines 0 comments Download
M webrtc/modules/audio_processing/aec/aec_resampler.c View 1 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/modules/audio_processing/aec/echo_cancellation.c View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/agc/agc_audio_proc.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/audio_buffer.cc View 3 chunks +5 lines, -8 lines 0 comments Download
M webrtc/modules/audio_processing/audio_processing_impl.h View 1 chunk +1 line, -3 lines 0 comments Download
M webrtc/modules/audio_processing/ns/ns_core.c View 1 2 5 chunks +9 lines, -9 lines 0 comments Download
M webrtc/modules/audio_processing/ns/nsx_core.c View 2 chunks +4 lines, -2 lines 0 comments Download
M webrtc/modules/audio_processing/splitting_filter_unittest.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M webrtc/modules/interface/module_common_types.h View 1 1 chunk +6 lines, -3 lines 0 comments Download
M webrtc/modules/utility/source/file_recorder_impl.h View 1 chunk +2 lines, -5 lines 0 comments Download
M webrtc/modules/utility/source/file_recorder_impl.cc View 2 chunks +3 lines, -10 lines 0 comments Download
M webrtc/modules/video_coding/main/test/release_test.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/system_wrappers/interface/aligned_array.h View 1 chunk +0 lines, -8 lines 3 comments Download
M webrtc/test/fake_audio_device.cc View 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/tools/agc/activity_metric.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/voice_engine/test/auto_test/standard/external_media_test.cc View 4 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (4 generated)
Peter Kasting
This is basically a catchall change the covers all the non-functional bits not in my ...
5 years, 6 months ago (2015-06-10 02:15:55 UTC) #2
juberti1
lgtm
5 years, 6 months ago (2015-06-10 05:36:52 UTC) #3
kjellander_webrtc
On 2015/06/10 at 05:36:52, juberti wrote: > lgtm webrtc/{test,tools}: lgtm
5 years, 6 months ago (2015-06-10 06:12:24 UTC) #4
Andrew MacDonald
lgtm on my parts with a nit and one potentially legitimate concern. https://codereview.webrtc.org/1172163004/diff/1/webrtc/common_audio/resampler/sinc_resampler.cc File webrtc/common_audio/resampler/sinc_resampler.cc ...
5 years, 6 months ago (2015-06-10 06:23:56 UTC) #5
åsapersson
lgtm: webrtc/modules/utility/
5 years, 6 months ago (2015-06-10 07:50:42 UTC) #6
henrika_webrtc
LGTM: webrtc/modules/audio_device/, webrtc/system_wrappers/
5 years, 6 months ago (2015-06-10 08:11:25 UTC) #7
henrika_webrtc
https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/audio_device/audio_device_buffer.cc File webrtc/modules/audio_device/audio_device_buffer.cc (left): https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/audio_device/audio_device_buffer.cc#oldcode409 webrtc/modules/audio_device/audio_device_buffer.cc:409: if (nSamples != _recSamples) Not sure why these lines ...
5 years, 6 months ago (2015-06-10 08:11:35 UTC) #8
kwiberg-webrtc
lgtm for webrtc/modules/audio_coding/ with (mostly) optional nits https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/audio_coding/codecs/g711/test/testG711.cc File webrtc/modules/audio_coding/codecs/g711/test/testG711.cc (right): https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/audio_coding/codecs/g711/test/testG711.cc#newcode32 webrtc/modules/audio_coding/codecs/g711/test/testG711.cc:32: return true; ...
5 years, 6 months ago (2015-06-10 11:58:33 UTC) #9
Wez
https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/desktop_capture/win/window_capture_utils.cc File webrtc/modules/desktop_capture/win/window_capture_utils.cc (right): https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/desktop_capture/win/window_capture_utils.cc#newcode32 webrtc/modules/desktop_capture/win/window_capture_utils.cc:32: if (window_placement.showCmd == SW_SHOWMAXIMIZED) { This changes behaviour in ...
5 years, 6 months ago (2015-06-10 17:39:31 UTC) #10
Peter Kasting
On 2015/06/10 08:11:25, henrika_webrtc wrote: > LGTM: webrtc/modules/audio_device/, webrtc/system_wrappers/ Please also look at webrtc/voice_engine/test/auto_test/standard/external_media_test.cc. https://codereview.webrtc.org/1172163004/diff/1/webrtc/common_audio/resampler/sinc_resampler.cc ...
5 years, 6 months ago (2015-06-11 04:31:41 UTC) #11
Wez
+jiayl@, who I believe wrote the GetCroppedWindowRect() method, to confirm its use/test procedure. https://codereview.webrtc.org/1172163004/diff/1/webrtc/modules/desktop_capture/win/window_capture_utils.cc File ...
5 years, 6 months ago (2015-06-11 17:00:48 UTC) #13
Peter Kasting
On 2015/06/11 17:00:48, Wez wrote: > Ugh... seems a waste to break this out to ...
5 years, 6 months ago (2015-06-11 20:08:17 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/728d9037c016c01295177fa700fc7927f0bb80bb Cr-Commit-Position: refs/heads/master@{#9420}
5 years, 6 months ago (2015-06-11 21:31:57 UTC) #16
Peter Kasting
Committed patchset #3 (id:40001) manually as 728d9037c016c01295177fa700fc7927f0bb80bb (presubmit successful).
5 years, 6 months ago (2015-06-11 21:32:31 UTC) #17
Ben Chan
https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/interface/aligned_array.h File webrtc/system_wrappers/interface/aligned_array.h (left): https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/interface/aligned_array.h#oldcode71 webrtc/system_wrappers/interface/aligned_array.h:71: int rows() const { As a helper class, the ...
5 years, 6 months ago (2015-06-17 14:48:56 UTC) #19
Peter Kasting
https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/interface/aligned_array.h File webrtc/system_wrappers/interface/aligned_array.h (left): https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/interface/aligned_array.h#oldcode71 webrtc/system_wrappers/interface/aligned_array.h:71: int rows() const { On 2015/06/17 14:48:56, Ben Chan ...
5 years, 6 months ago (2015-06-17 19:47:29 UTC) #20
Ben Chan
On 2015/06/17 19:47:29, Peter Kasting wrote: > https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/interface/aligned_array.h > File webrtc/system_wrappers/interface/aligned_array.h (left): > > https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/interface/aligned_array.h#oldcode71 ...
5 years, 6 months ago (2015-06-17 20:05:42 UTC) #21
kjellander_webrtc
5 years, 6 months ago (2015-06-18 08:22:46 UTC) #22
Message was sent while issue was closed.
https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/in...
File webrtc/system_wrappers/interface/aligned_array.h (left):

https://codereview.webrtc.org/1172163004/diff/40001/webrtc/system_wrappers/in...
webrtc/system_wrappers/interface/aligned_array.h:71: int rows() const {
On 2015/06/17 19:47:29, Peter Kasting wrote:
> On 2015/06/17 14:48:56, Ben Chan wrote:
> > As a helper class, the rows() and cols() getters seem quite useful. This
class
> > doesn't provide any iterator interface, which means a user of this class
> likely
> > needs to memorize the number of rows and columns separately. It seems the
> > benefit of keeping these two getters outweighs the cost, if any.
> 
> No one called these.  I have no opposition to adding them in the future if
> someone wants to call them, but if they're simply unused I don't think they
> should be publicly visible.

Since it seems there's code that uses them outside the WebRTC repo, I think we
should add them back. I made https://codereview.webrtc.org/1178043005/ for that.

Powered by Google App Engine
This is Rietveld 408576698